Nagios, do you pay for sms service?

22 04 2008

I don’t think nagios need any introduction. Neither does the fact that it can send out email and sms alert.

But what about getting alerts on your phone ? And at free of cost?

A few weeks back, I found this gateway. Surely, there are many other such gateways, but I did not have time to search for them. Rather, I decided to go on with my experiment on the network I manage at WBUT.

This gateway supports email2sms. But it requires you to register and upload your phone number and mail id ( from which you are sending these alert mails) to be added to your portal profile. So I registered an account with them with my mobile number 9999999999 and email

The gateway also requires that the mail, which will be converted to sms, have your mobile number as a subject.

So to accomplish that, without any loss of functionality of the alerts, I had to change the command.cfg file a bit.

All I did was to change the mail function to

‘notify-host-by-email’ command definition
define command{
command_name notify-host-by-email
command_line /usr/bin/printf “Nagios Host: $HOSTNAME$ $HOSTSTATE$ Time: $LONGDATETIME$\n” | /bin/mail -s “9999999999” $CONTACTEMAIL$


Where 9999999999 would be your mobile number and nagios@your_server would be email registered with the portal.

Thats all. Just shut down one of your hosts and wait. You received a sms. Didn’t you?

Of course, this is implemented for monitoring the servers at WBUT. Whenever a server is down or unreachable for more that 15 mins, we get a sms !!! 🙂




3 responses

20 09 2008

Excellent find!!
There are some smart people around…this is actually quite a clever way for server monitoring!

17 11 2008


I am trying to get nagios to send notifications to my cell phone. I have been working on this for days, and I am very confused. I read this article, and it looks promising to me. However, when I clicked on the “A few weeks back, I found this gateway.” part, I was taken to a site that appears to be based in India. Therefore, I would like to know if this system would work free of cost as a gateway in the United States.


18 11 2008

@willie The only way to verify this is to test if this gateway can send sms to USA.
Please Verify that and let me know by mail. (
If not, find a free email-to-sms gateway for USA.
That should work also.

%d bloggers like this: