Nagios and SMS


Hi All,

I need some help configuring my Nagios with SMS. I am quite a noob and this is my first attempt at getting nagios working. I have got the modem working and I can successfully SMS from my Nagios machine (with a lot of help from others). However what I want to do is to configure nagios so that it only notifies me by SMS in the following confitions:

1 - It is out of work hours (i.e. 5.30pm - 9 am and all weekend). Email alerts can stay 24x7
2 - The service / host state is only unreachable, critical or recovered (not for warning, flapping or scheduled)

Has anyone succesfully done this? if so can you please help me?

Many thanks in advanced.


I’ll give you a quick rundown including links to the docs. You’re going to have to make a new “time period”. read this: … timeperiod

and then you’re going to have to make a new contact (sms-user perhaps?) in your contacts.cfg file. read this: … ml#contact

Read each entry there and i think you’ll get the gist of what criteria your new contact will have. basically, set appropriate host and service notification periods (the timeperiod you just made), set the service and host notification commands to ‘notify-by-epager’ and ‘host-notify-by-epager’ respectively (if that’s the defined command you’re using, you mentioned already being able to SMS), set the “service_notification_options” and host_notification_options to “u,c,r” , then finally add your new sms user to whatever contactgroup you are using in your service definitions (edit your contactgroups.cfg).