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 Icinga 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)
4. 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$)"
}