Page 1 of 1

SMS integration with NagiosXI

Posted: Tue Jul 30, 2019 7:43 am
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

Re: SMS integration with NagiosXI

Posted: Wed Jul 31, 2019 2:42 pm
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.

Re: SMS integration with NagiosXI

Posted: Mon Aug 05, 2019 6:07 am
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

Re: SMS integration with NagiosXI

Posted: Mon Aug 05, 2019 4:23 pm
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.