SMS integration with NagiosXI

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
FrancisNagios
Posts: 58
Joined: Tue Apr 09, 2019 6:54 am

SMS integration with NagiosXI

Post by FrancisNagios »

Hi,

We're working with NagiosXI 5.4.13 on a RedHat 7.6 server
We want to integrate some alerts for you to send email and SMS

We have mounted a pass server on the same network with this software installed (SMS is the Diafaan SMS Server 3.2.0.1 basic edition) with GSM, HTTP and Database connectors.

We have tried running this command from the Nagios server and sending SMS:
curl "http://MACHINE_PASALELA:4375/http/send-message?to-TELEFONO_MOVIL&message-type-sms.text&message-TEST_ALERT
OK: xxxxx-xxxxx-xxxxx-xxxxx-xxxx

How can we integrate CRITICAS - WARNING alerts for me to send SMS?

We have read the manual: https://assets.nagios.com/downloads/nag ... ios-XI.pdf but we don,t use a local SMS Gateway.

Thanks and regards
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: SMS integration with NagiosXI

Post by cdienger »

You'll want to write a script that will accept arguments(like the a phone number and macros(https://assets.nagios.com/downloads/nag ... ervicedesc)to make up the message) and make sure that you can run it from the command line. Once that is done you'll create commands in XI under Configure > Core Config Manger > Commands > _Commands. For an example, look at the below host notification command.

After the command(s) are created, you'll need to apply them to a contact under Configure > Core Config Manger > Alerting > Contacts > *edit or add contact* > Alert Settings > Manage Host Notification Commands/Manage Service Notification Commands.

Note that you'll want to create two commands - one for host notifications and the second for service notifications. Macros of likely interest for service notification:

$NOTIFICATIONTYPE$ $SERVICDESC$ $SERVICESTATE$ $SERVICEOUTPUT$

you can find a complete list of macros at https://assets.nagios.com/downloads/nag ... ervicedesc.
You do not have the required permissions to view the files attached to this post.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
FrancisNagios
Posts: 58
Joined: Tue Apr 09, 2019 6:54 am

Re: SMS integration with NagiosXI

Post by FrancisNagios »

Hi,

Thanks for the info.
We understand the script and commands.
But we have doubts about the contact
Not all monitored HOST that the contact should send SMS.

Some HOST will be by mail and others Host by mail and SMS.
How can we do it?
Would it be to create a copy of the contact with just SMS sending and apply it to the HOST?

Example
Host1: Contact Peter. Shipping Mail.
Host2: Contact Peter. Shipping Mail
Host3: Contact Peter. Send Mail and SMS

Thanks and regards
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: SMS integration with NagiosXI

Post by ssax »

My recommendation would be for you to create a separate peter_sms contact so that you can get granular like you're trying to do and then only add peter_sms to the ones he wants SMS on.
Locked