VMware vSphere

 View Only
  • 1.  Custom sms alert metod

    Posted Apr 30, 2008 01:11 PM
    Hi

    Im sorry if my question has already been answered somewhere else in this forum but have searched for 2 days without having found an viable answer to my problem.

    Im new to Hyperic, so this might be simple - i dont know...

    I have installed the latest Hyperic HQ release onto a windows 2003 server using the provided msi installation package.

    Now my problem is this:
    I have a sms capable gsm modem connected to the server, this i have used together with opmanager from adventnet in order to send sms alerts, using simple dos commands, formatted like this:
    cmd /c /smsformat $messagestring targetnumber

    now, my question is this:
    how - if possible, do i change the config file sms_email.gsp so that this command is used for sending sms alerts?

    And is this the right way to go?


  • 2.  RE: Custom sms alert metod

    Posted May 01, 2008 03:07 PM
    Yes, as far as I know, changing the GSP templates is the way to do this.

    We're sending SMS messages through an HTTP/XML webservice, available
    at our SMS provider. I've written a simple Java library, which gets included
    in the GSP templates. Sending an SMS from the templates then becomes quite trivial, e.g.:

    -----
    import nl.ic-s.hq.sms;

    String username = "foo";
    String password = "bar";
    String gateway = "1";
    String recipient = "1234567890";

    SMS sms = new SMS();
    sms.setAuthentication(username, password);
    sms.setGateway(gateway);
    sms.setOriginator("Hyperic HQ");
    sms.setMessage(${action.shortReason});
    sms.setRecipients(recipient);

    sms.sendSMS();
    -----


  • 3.  RE: Custom sms alert metod

    Posted May 01, 2008 05:49 PM
    OK Leander, thankyou for your answer

    so I've found the right template, now all i have to do i learn how to script Hyperic so that I can use a locally connected gsm modem instead of a sms service provider - any1 have any imput for this?