VMware Cloud Community
zzelt
Contributor
Contributor

Custom sms alert metod

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?
Reply
0 Kudos
2 Replies
Leander
Contributor
Contributor

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();
-----
Reply
0 Kudos
zzelt
Contributor
Contributor

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?
Reply
0 Kudos