Need Assistance with sending SMS alerts

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Berto
Posts: 162
Joined: Tue Jul 01, 2014 6:12 pm

Need Assistance with sending SMS alerts

Post 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
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Need Assistance with sending SMS alerts

Post 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.
Former Nagios employee
User avatar
rhassing
Posts: 416
Joined: Sat Oct 05, 2013 10:29 pm
Location: Netherlands

Re: Need Assistance with sending SMS alerts

Post 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?
Rob Hassing
Image
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Need Assistance with sending SMS alerts

Post 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.
Former Nagios employee
User avatar
rhassing
Posts: 416
Joined: Sat Oct 05, 2013 10:29 pm
Location: Netherlands

Re: Need Assistance with sending SMS alerts

Post by rhassing »

I must say Nagios is fully capable of sending text messages. I use it on our Nagios servers.
Rob Hassing
Image
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Need Assistance with sending SMS alerts

Post 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.
User avatar
rhassing
Posts: 416
Joined: Sat Oct 05, 2013 10:29 pm
Location: Netherlands

Re: Need Assistance with sending SMS alerts

Post 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....
Rob Hassing
Image
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Need Assistance with sending SMS alerts

Post 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.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
Berto
Posts: 162
Joined: Tue Jul 01, 2014 6:12 pm

Re: Need Assistance with sending SMS alerts

Post 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
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Need Assistance with sending SMS alerts

Post 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.
Former Nagios employee
Locked