[op5-users] op5 plugin: notify
Mirza Dedic
mirde at oppy.com
Wed Oct 21 19:26:40 CEST 2009
Hello,
Has anyone successfully got the notify plugin to work in their Nagios/Ninja/Merlin environment? While I do like the default template with Nagios, I think having it as extensive and eaze-of-control as this plug-in allows would be a great add-on.
Currently I am setup with Nagios (3.1.2) / Merlin / Ninja.
My commands file consists of:
# 'notify-host-by-email' command definition
define command{
command_name notify-host-by-email
command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$
}
# 'notify-service-by-email' command definition
define command{
command_name notify-service-by-email
command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
}
I would imagine this would need to be changed/updated etc. Anyone have a how-to ?
Thanks.
More information about the op5-users
mailing list