Skip to content

Instantly share code, notes, and snippets.

@discordianfish
Created September 6, 2011 14:17
Show Gist options
  • Save discordianfish/1197659 to your computer and use it in GitHub Desktop.
Save discordianfish/1197659 to your computer and use it in GitHub Desktop.
# 'notify-by-irc'
define command {
command_name notify-by-irc
command_line /srv/nagios/nagbot-notify.sh "$NOTIFICATIONTYPE$;$SERVICEDESC$;$HOSTALIAS$;$HOSTADDRESS$;$SERVICESTATE$;$LONGDATETIME$;$SERVICEOUTPUT$"
}
---
define contact {
name default-contact
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r,f,s
host_notification_options d,u,r,f,s
service_notification_commands service-notify-by-email, notify-by-irc
host_notification_commands host-notify-by-email, notify-by-irc
register 0
}
---
#!/bin/sh
echo "$1" > /var/cache/nagios3/notify.txt-output
echo "was started at `date`" > /tmp/naglog.txt
---
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment