Home / Integration plugins / op5 Monitor SMS Integration

op5 SMS notifications – integration manual

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

SMSEagle is an offline hardware SMS gateway. Therefore no external connection to 3rd party system is required. All notifications are generated on-premise and sent directly to a cellular network. This solution can be used in secure installations without Internet access.

SMSEagle Setup

  1. Create a new user for this script in SMSEagle webGUI > menu Users.
  2. When the user is saved, edit its permissions by clicking “Access to API”:
    • a) check “APIv1”
    • b) click “Generate new token”
This will generate a new API access token for your SMSEagle. This API token will be referenced below as SMSEAGLEAPITOKEN. Replace SMSEAGLEAPITOKEN in script below with your value. In the same menu, add the permissions for APIv1 methods you want to use:
    • send_sms => sms
    • ring_call => ring
    • tts_call => tts
    • tts_adv_call => tts_adv

op5 Setup

1. Download latest version of the script notify_eagle_sms.pl from our repository: https://github.com/smseagle/smseagle-nagios
Place the plugin in your op5 plugins directory.

2. Create the SMS notification commands. (Commonly found in commands.cfg)

3. Replace SMSEAGLEURL with URL Address of your SMSEagle device (for example: http://192.168.50.150)

3. Replace SMSEAGLEAPITOKEN with your API token for your SMSEagle (for example: NZg2yNmWYb5Q7I3Y3Ifnk5E)
(Optional parameter for calls, default: 10) Add -duration parameter with call duration value (in seconds, e.g. -duration 15)
(Required for TTS Advanced) Replace SMSEAGLEVOICE with voice model ID (found in SMSEagle menu, Calls > TTS Voice models)

Define below commands:

define command {
        command_name notify-by-sms 
        command_line $USER1$/notify_eagle_sms.pl -s SMSEAGLEURL -a SMSEAGLEAPITOKEN -dstaddr $CONTACTPAGER$ -t "$NOTIFICATIONTYPE$ $SERVICESTATE$ $SERVICEDESC$ Host($HOSTNAME$) Info($SERVICEOUTPUT$) Date($SHORTDATETIME$)" 
} 

define command { 
        command_name host-notify-by-sms 
        command_line $USER1$/notify_eagle_sms.pl -s SMSEAGLEURL -a SMSEAGLEAPITOKEN -dstaddr $CONTACTPAGER$ -t "$NOTIFICATIONTYPE$ $HOSTSTATE$ Host($HOSTALIAS$) Info($HOSTOUTPUT$) Time($SHORTDATETIME$)" 
}

define command { 
        command_name notify-by-ring-call 
        command_line $USER1$/notify_eagle_sms.pl -s SMSEAGLEURL -a SMSEAGLEAPITOKEN -c ring -dstaddr $CONTACTPAGER$ -t "$NOTIFICATIONTYPE$ $SERVICESTATE$ $SERVICEDESC$ Host($HOSTNAME$) Info($HOSTOUTPUT$) Time($SHORTDATETIME$)" 
}

define command { 
        command_name host-notify-by-ring-call 
        command_line $USER1$/notify_eagle_sms.pl -s SMSEAGLEURL -a SMSEAGLEAPITOKEN -c ring -dstaddr $CONTACTPAGER$ -t "$NOTIFICATIONTYPE$ $HOSTSTATE$ Host($HOSTALIAS$) Info($HOSTOUTPUT$) Time($SHORTDATETIME$)" 
}

define command { 
        command_name notify-by-tts-call 
        command_line $USER1$/notify_eagle_sms.pl -s SMSEAGLEURL -a SMSEAGLEAPITOKEN -c tts -dstaddr $CONTACTPAGER$ -t "$NOTIFICATIONTYPE$ $SERVICESTATE$ $SERVICEDESC$ Host($HOSTALIAS$) Info($HOSTOUTPUT$) Time($SHORTDATETIME$)" 
}

define command { 
        command_name host-notify-by-tts-call 
        command_line $USER1$/notify_eagle_sms.pl -s SMSEAGLEURL -a SMSEAGLEAPITOKEN -c tts -dstaddr $CONTACTPAGER$ -t "$NOTIFICATIONTYPE$ $HOSTSTATE$ Host($HOSTALIAS$) Info($HOSTOUTPUT$) Time($SHORTDATETIME$)" 
}

define command { 
        command_name notify-by-tts-adv-call
        command_line $USER1$/notify_eagle_sms.pl -s SMSEAGLEURL -a SMSEAGLEAPITOKEN -c tts_adv -dstaddr $CONTACTPAGER$ -voiceid SMSEAGLEVOICE -t "$NOTIFICATIONTYPE$ $SERVICESTATE$ $SERVICEDESC$ Host($HOSTALIAS$) Info($HOSTOUTPUT$) Time($SHORTDATETIME$)" 
}

define command { 
        command_name host-notify-by-tts-adv-call
        command_line $USER1$/notify_eagle_sms.pl -s SMSEAGLEURL -a SMSEAGLEAPITOKEN -c tts_adv -dstaddr $CONTACTPAGER$ -voiceid SMSEAGLEVOICE -t "$NOTIFICATIONTYPE$ $HOSTSTATE$ Host($HOSTALIAS$) Info($HOSTOUTPUT$) Time($SHORTDATETIME$)" 
}
 

4. In your op5 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 
email engineer@somedomain.com 
pager 48xxxxxxxx 
}

What is hardware
SMS Gateway?

Learn more about
SMSEagle features

Explore SMSEagle Demo device

SMSEagle is a hardware & software solution that guarantees a swift delivery of your messages to designated recipients, whether it’s for notifications, alerts, or important updates.

After registering to a demo you get a remote access to our physical device NXS-9750.

  • 14-days free trial
  • Access to over 20 functionalities