Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
25 lines (21 sloc) 1.42 KB
## Add the following commands in your shinken configuration file: commands.cfg ##
############### NOTIFICATIONS ###############
define command{
command_name host_email_alerts
command_line $PYTHON_VENV$/bin/python $PLUGINS_DIR$/mailgun_email_alerts.py -a '$HOSTADDRESS$' -H '$HOSTNAME$' -n '$HOSTATTEMPT$' -d '$DATE$' -t '$TIME$' -m '$HOSTOUTPUT$' -l '$HOSTSTATE$'
}
define command{
command_name service_email_alerts
command_line $PYTHON_VENV$/bin/python $PLUGINS_DIR$/mailgun_email_alerts.py -s '$SERVICEDESC$' -a '$HOSTADDRESS$' -H '$HOSTNAME$' -n '$SERVICEATTEMPT$' -d '$DATE$' -t '$TIME$' -m '$SERVICEOUTPUT$' -l '$SERVICESTATE$'
}
############### EVENT NOTIFICATIONS ###############
# Note: In this command, the -m/--message option uses command substitution (`)
# to execute the check_nrpe command in remote server. The output of check_nrpe
# command is passed as an argument to the plugin: mailgun_event_email_alerts.py
# Edit the check_nrpe command as per your requirement:
# -m "`$PLUGINS_DIR$/check_nrpe -H '$HOSTADDRESS$' -t '15' -c '<event_command_name>'`"
#
define command{
command_name nrpe_service_event_handler
command_line $PYTHON_VENV$/bin/python $PLUGINS_DIR$/mailgun_event_email_alerts.py -m "`$PLUGINS_DIR$/check_nrpe -H '$HOSTADDRESS$' -t '15' -c 'event_command'`" -s '$SERVICEDESC$' -a '$HOSTADDRESS$' -H '$HOSTNAME$' -n '$SERVICEATTEMPT$' -d '$DATE$' -t '$TIME$' -l '$SERVICESTATE$'
}