Lets spice it up with coffeescript!
Nagios
define contact{
contact_name mike
alias Mike Kunze
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r
host_notification_options d,r
service_notification_commands notify-service-with-nodejs
host_notification_commands notify-host-by-email
email
}
define command {
command_name notify-service-with-nodejs
command_line /opt/bin/notify-service.coffee "$HOSTNAME$" "$SERVICEDESC$" "$HOSTADDRESS$" "$NOTIFICATIONTYPE$" "$SERVICESTATE$" "$LONGDATETIME$" "$SERVICEOUTPUT$"
}
CoffeeScript
This script will be executed by nagios and will contain the macros provided by the nagios command.
No comments:
Post a Comment