Page 1 of 3

Need Assistance with sending SMS alerts

Posted: Tue Jan 13, 2015 10:53 am
by Berto
Hello,

I have been evaluating Nagios as a possible replacement from our current monitoring tool that my company uses. I have set up a few clients for the Nagios server to monitor and have been getting e-mails alerting me of any issues but I would now like to see if it's possible to not only have e-mails sent but have alerts sent to our on-call cell phone when alerts are triggered. Our current monitoring tool provides this feature by simply adding our on-call cell phone to a config file. Is there any documentation that I can look at to see which config files need to be changed? I have tried looking through the previous forum posts but don't see anything to help get me started. Thanks for your assistance.

--Berto

Re: Need Assistance with sending SMS alerts

Posted: Tue Jan 13, 2015 10:59 am
by tmcdonald
Most phone providers let you use an email address format like "[email protected]" so you can email to that phone's address and it will arrive as a text message. This is the simplest way I can think of. Barring that you would need to get a SMS modem, write a script to call its API with the proper parameters, and make that script into a Nagios command which is then assigned to the contact for that phone.

Re: Need Assistance with sending SMS alerts

Posted: Tue Jan 13, 2015 11:02 am
by rhassing
Where is the problem?
Is it in configuring a device which is capable of sending text messages or is it in the Nagios configuration?

Re: Need Assistance with sending SMS alerts

Posted: Tue Jan 13, 2015 11:10 am
by tmcdonald
Rob brings up a good point. I assume you are asking for help with the Nagios side of things, but in general we only officially provide support within that realm - if your SMS modem is failing, that's not something we can assist with. Just a heads-up.

Re: Need Assistance with sending SMS alerts

Posted: Tue Jan 13, 2015 3:31 pm
by rhassing
I must say Nagios is fully capable of sending text messages. I use it on our Nagios servers.

Re: Need Assistance with sending SMS alerts

Posted: Tue Jan 13, 2015 5:46 pm
by slansing
@Berto, let us know what tools you are looking at using (out of band SMS modem, etc). @Rob, do you have any documentation you followed? As Tmcdonald mentioned, it should be fairly easy to send out sms messages, as even XI uses emailTOsms through your carrier.

Re: Need Assistance with sending SMS alerts

Posted: Wed Jan 14, 2015 3:08 am
by rhassing
I'm using smstools3 (http://smstools3.kekekasvi.com/). This tool can be used to send text messages using a device that is capable of sending these messages :-)
I could give the config for Nagios if requested....

Re: Need Assistance with sending SMS alerts

Posted: Wed Jan 14, 2015 7:42 am
by eloyd
Just to add to the conversation, are you trying to send SMS messages, or are you actually placing an outbound telephone call using a phone switch of some sort? If it's the former, then you have to make (or use an existing) shell script that is capable of sending the appropriate commands to your SMS modem or provider, and then add a contact that uses that script for its notification technique.

If you're trying to make actual phone calls, then we should talk, since that is part of what our company does for our own Nagios and it's more complex.

Re: Need Assistance with sending SMS alerts

Posted: Wed Jan 14, 2015 3:22 pm
by Berto
Thanks for all the replies.

I'm looking to see what the Nagios configuration would like like to send text messages to our on-call cell phone. With our current monitoring tool we just added our on-call cellphone to the config that when an alert e-mail was generated, it also sends a text message. I tried adding the cell phone to the contacts.cfg file but nothing got sent, so if anyone has a config I can look at that send a text message to their cell phone I would appreciate it to see what needs to be done.

--Berto

Re: Need Assistance with sending SMS alerts

Posted: Wed Jan 14, 2015 3:28 pm
by tmcdonald
What specifically did you put in to the "email" field? And does your carrier support the "[email protected]" usage?

I have the following:

Code: Select all

define contact {
    contact_name                        nagiosadmin
    alias                               Nagios Administrator
    host_notification_period            nagiosadmin_notification_times
    service_notification_period         nagiosadmin_notification_times
    host_notification_options           d,u,r,f,s
    service_notification_options        w,u,c,r,f,s
    host_notification_commands          xi_host_notification_handler
    service_notification_commands       xi_service_notification_handler
    email                               [email protected]
    use                                 xi_contact_generic
    }
This is for an XI system but the configs are essentially the same.