Setup SMS notification with existing SMS Gateway

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.
Locked
User avatar
sushant4tech
Posts: 25
Joined: Fri Jul 31, 2015 12:24 am

Setup SMS notification with existing SMS Gateway

Post 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?
- $u$h@nT
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Setup SMS notification with existing SMS Gateway

Post 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?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
sushant4tech
Posts: 25
Joined: Fri Jul 31, 2015 12:24 am

Re: Setup SMS notification with existing SMS Gateway

Post 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.
- $u$h@nT
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Setup SMS notification with existing SMS Gateway

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked