Nagios SMS notifications – integration manual

Here we describe how to setup Nagios with SMSEagle for SMS notifications. It should take you about 5 min to have it up and running.

This tutorial is also available on: Nagios Exchange website

SMSEagle Setup

  1. Create a new user for this script in SMSEagle webGUI > menu Users.
  2. When the user is saved, edit its properties and under API Access token:
    a) check Enable token
    b) click Generate new token
    This will generate a new API access token for your SMSEagle. The API token will be referenced below as SMSEAGLEAPITOKEN. Replace SMSEAGLEAPITOKEN in script below with your value.

Nagios Setup

1. Download latest version of the script from our repository:
Place the plugin in your Nagios plugins directory.

2. Create the SMS notification commands (commonly found in file commands.cfg).
Replace SMSEAGLEURL with URL Address of your SMSEagle device (for example:
Replace SMSEAGLEAPITOKEN with your API token for your SMSEagle (for example: NZg2yNmWYb5Q7I3Y3Ifnk5E)

Define two commands:

define command { 
command_name notify-by-sms 

define command { 
command_name host-notify-by-sms 

3. In your Nagios contacts (commonly found in file contacts.cfg) add the contact. Field „pager” should contain a mobile number for sms alerts in full international format without leading + sign, for example: 48xxxxxxxxx (if your mobile operator requires + sign in a telephone number put 00 instead)

define contact { 
contact_name engineer 
alias Support Engineer 
service_notification_period 24x7 
host_notification_period 24x7 
service_notification_options w,u,c,r 
host_notification_options d,u,r 
service_notification_commands notify-by-email,notify-by-sms 
host_notification_commands host-notify-by-email,host-notify-by-sms 
pager 48xxxxxxxx 

Notice for Nagios XI users: If you encounter perl error, please add the path to the perl executable at the start of the command in Nagios.