Page 1 of 1

Setup SMS notification with existing SMS Gateway

Posted: Sat Sep 05, 2015 5:50 am
by sushant4tech
Hi Again,

I have set up Nagios Core which is working fine. I do get email notifications. Now i want to set up SMS notifications. Our company already have contract with a SMS gateway firm. I am told to use their services for Nagios SMS alerts/notification. I can get all the credentials required to set up the SMS notification.

What i need to know is what is required here? Is there any ready script that i can tweak to adjust it to set with our existing SMS Gateway. There are lots of options when i googled but everyone (SMS gateways) is pushing their own scripts which is customized.

Is there any plain script which can be tuned to set up with existing gateway. If yes what are all the input that i would require from my gateway. Basically how do i set up SMS notification with existing gateway?

Re: Setup SMS notification with existing SMS Gateway

Posted: Sun Sep 06, 2015 10:30 pm
by Box293
Generally speaking, a contact uses the commands notify-host-by-email and notify-service-by-email which is just a big printf that is piped to /bin/mail.

You could create separate commands that submit notification to your SMS gateway, they could use the contact "pager" directive. You then assign these commands to the contacts (in addition to the existing commands). In this setup, the contact would receive both an email and an sms.

If you wanted to get granular in escalations, like only send SMS's when x notifications have been sent, then you'll really need to create separate contact objects which will make your life easier.

Does that help?

Re: Setup SMS notification with existing SMS Gateway

Posted: Mon Sep 07, 2015 11:28 pm
by sushant4tech
Hi Box,

I am aware that i will have to add commands to 'command.cfg'. But these commands are suppose to refer/call to a plugin in nagios library plugins directory. Usually i can get all the scripts from internet, but i cant find any custom/ready script where i just need to put in the gateway credentials.
I have not configured the SMS notification before. I have no idea of how to configure it. I know its lame but there is first time for everything. I want the script and want to know what credentials/details would i require from my sms gateway to add it to this script which then i can declare as commands and call in service definition.

Re: Setup SMS notification with existing SMS Gateway

Posted: Tue Sep 08, 2015 12:02 am
by Box293
The command can reference an executible or script which can be located anywhere, it does not have to be in libexec.
sushant4tech wrote:Our company already have contract with a SMS gateway firm. I am told to use their services for Nagios SMS alerts/notification. I can get all the credentials required to set up the SMS notification.
So how does your company currently use this SMS gateway? Through a webpage? Is there an API available so you can submit commands to it? You can even use WGET or CURL to issue a POST to a webpage to submit data.

If you have a way of submitting the SMS then we can work out how to construct the command.