| File | Date | Author | Commit |
|---|---|---|---|
| Configure-NagiosXI.md | 2019-11-27 |
|
[b010a1] Initial commit |
| Pipfile | 2019-11-27 |
|
[b010a1] Initial commit |
| README.md | 2019-11-27 |
|
[b010a1] Initial commit |
| d7sms.py | 2019-11-27 |
|
[b010a1] Initial commit |
Python script for sending SMS notifications from Nagios using D7SMS Gateway.
These instructions will get you a copy of the script and configuration guidelines for setting it up in Nagios
Before starting nagios setup Copy d7sms.py to nagios plugin folder make sure you have a valid subscription on https://d7networks.com.
Please contact nagios@d7networks.com or signup at https://d7networks.com for FREE sms credits.
Copy d7sms.py to your nagios plugins folder and make it executable. You can download it from https://github.com/d7networks/nagios/blob/master/d7sms.py
Following the location of plugins folder in different Operating Systems.
Debian/Ubuntu: /usr/local/nagios/libexec
Centos: /usr/lib/nagios/plugins (32 bit)
/usr/lib64/nagios/plugins (64 bit)
Default path : /usr/local/nagios/etc/objects/commands.cfg
define command{
command_name service-notify-by-sms
command_line $USER1$/d7sms.py --username API_Username --password API_Password --to $CONTACTPAGER$ --content "$NOTIFICATIONTYPE$:$SERVICEDESC$ on $HOSTNAME$ with IP $HOSTADDRESS$ Current State $SERVICESTATE$ Service Info: $SERVICEOUTPUT$ Date: $LONGDATETIME$"
}
define command{
command_name host-notify-by-sms
command_line $USER1$/d7sms.py --username API_Username --password API_Password --to $CONTACTPAGER$ --content "$NOTIFICATIONTYPE$: Host: $HOSTNAME$, State: $HOSTSTATE$, Address: $HOSTADDRESS$, Info: $HOSTOUTPUT$, Date/Time: $LONGDATETIME$"
}
Default path : /usr/local/nagios/etc/objects/templates.cfg
service_notification_commands notify-service-by-email,service-notify-by-sms
host_notification_commands notify-host-by-email,host-notify-by-sms
You can get the latest version of this script from https://github.com/d7networks/nagios
For all queries and help on installation please contact nagios@d7networks.com or visit https://d7networks.com
Setup instructions for NagiosXI can be found here: https://github.com/d7networks/nagios/blob/master/Configure-NagiosXI.md