Build precise queries to find exactly what you need
Press ESC to close
Join our next live webinar: “Advanced Nagios Monitoring Techniques” – Register Now
Your review has been submitted and is pending approval.
This tutorial explains how to integrate a standard Nagios monitoring server with an SMS notification external device, the FoxBox (www.smsfoxbox.it). Thus, you will be able to forward the alerts from your hosts/services on a mobile phone using the GSM network, often more reliable than classic architectures based on Ethernet standards. FoxBox comes in two similar versions (G25 and LX800) differing on hardware specifics, and this system can be safely used on each of them without problems. Also older version (G20) supports this plugin, but here is required some modification on paths and filenames.
This guide has been developed for Debian Squeeze and Nagios 3.x.x.
Current Version
3.0
Last Release Date
April 10, 2013
Owner
Luca Rasina
Website
http://www.smsfoxbox.it
Download URL
http://www.smsfoxbox.it/fb/foxbox/tutorials/nagios__official__integration_for_sms_notification.html
License
GPL
Compatible With
Step #1 (FoxBox side) The device is designed for these kind of communication tasks, so there is not much to do here except: A) Provide a valid IP address, reachable from our monitoring server; B) Insert a tested and full working SIM card, to send the SMS. Step #2 (Monitoring server side) First of all we need to place the script sendSMS.sh inside of the folder /usr/lib/nagios/plugins/. It is also important to set properly the permissions on this file, to allow the Nagios user executing it. Now we should add the new notification commands, working on the SMS channel instead of the classic email one. To do so, we have to add these lines to the file /etc/nagios3/commands.cfg: # 'notify-host-by-foxbox' command definition define command{ command_name notify-host-by-foxbox command_line /usr/lib/nagios/plugins/sendSMS.sh -h "127.0.0.1" -u "nagiosadmin" -pw "nagios" -n "$CONTACTPAGER$" -m "Host Alert: $HOSTNAME$ nHost State: $HOSTSTATE$ nDate/Time: $LONGDATETIME$" } # 'notify-service-by-foxbox' command definition define command{ command_name notify-service-by-foxbox command_line /usr/lib/nagios/plugins/sendSMS.sh -h "127.0.0.1" -u "nagiosadmin" -pw "nagios" -n "$CONTACTPAGER$" -m "Service Alert: $HOSTALIAS$/$SERVICEDESC$ nService State: $SERVICESTATE$ nDate/Time: $LONGDATETIME$" } As you can see, we need a new information for the contacts: the phone number. Thus, we have to define it as "pager" in the file /etc/nagios3/conf.d/contacts_nagios2.cfg. Moreover, we set up the service/host notification command. By default these are using the email channel, while we want to alert with the new notification commands, so we have to edit the parameters "service_notification_commands" and "host_notification_commands" too: define contact{ contact_name test-contact use generic-contact alias tester email yourname@domain host_notification_commands notify-host-by-foxbox service_notification_commands notify-service-by-foxbox pager 12453683421 } Obviously, once finished the configurations we have to restart the Nagios service in order to see their effects. To check that everything is ok, maybe you could launch the pre-flight check with: nagios3 -v /etc/nagios3/nagios.cfg This architecture has also been natively implemented on a pair of FoxBox versions, providing an all-in-one notification solution (EasyG2 G25 and Monitoring LX800). --- Reference site: www.smsfoxbox.it ----
You must be logged in to submit a review.
To:
From: