Append to /usr/local/nagios/etc/objects/commands.cfg:
# Results in a SMS like:# RECOVERY: SMS on 127.0.0.1@localhost, State: OK, Output: 100, Date: 01-15-2021 12:30:28
define command {
command_name notify-service-by-sms
command_line $USER1$/sms77.py MY_SMS77_API_KEY $CONTACTPAGER$ "$NOTIFICATIONTYPE$:$SERVICEDESC$ on $HOSTADDRESS$@$HOSTNAME$, State $SERVICESTATE$, Output: $SERVICEOUTPUT$, Date: $SHORTDATETIME$"--from=Nagios}# Results in a SMS like:# CUSTOM on 127.0.0.1@localhost, State: OK, Output: 100, Date: 01-15-2021 12:30:28
define command {
command_name notify-host-by-sms
command_line $USER1$/sms77.py MY_SMS77_API_KEY $CONTACTPAGER$ "$NOTIFICATIONTYPE$ on $HOSTADDRESS$@$HOSTNAME$, State: $HOSTSTATE$, Output: $HOSTOUTPUT$, Date: $SHORTDATETIME$"--from=Nagios}
Optionally add a local service for a quick test. Append in /usr/local/nagios/etc/objects/localhost.cfg:
define service {uselocal-service
host_name localhost
service_description SMS
check_command notify-host-by-sms
}
Available options:
sms77.py
[-h][--debug][--delay DELAY][--details][--flash][--foreign_id FOREIGN_ID][--from FROM][--json][--label LABEL][--no_reload][--performance_tracking][--return_msg_id][--ttl TTL][--udh UDH][--unicode][--utf8]
api_key to text
Support
Please send us an Email if you have further questions about the integration of sms77 in Nagios.
Search field cannot be blank
sms77.io becomes seven.io
You are seeing this message because you joined us through our old name.
sms77.io has now become seven.io.
You can now reach our service, our website and us right here on seven.io. Do you have any questions or open concerns about this? Please feel free to contact us!
Learn more about this and all the changes in our blog post.