[Nagios-devel] Custom misccommands.cfg
Posted: Wed Dec 13, 2006 11:34 am
Quick question, wondering if it was possible to grab a HOSTGROUP
variable when using a command like host-notify-by-email, or
notify-by-email. I would like the notification to show which hostgroup
the affected host belongs to?
The following does not work:
define command{
command_name notify-by-email
command_line /usr/bin/printf "%b" "***** Nagios-MCI
*****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService:
$SERVICEDESC$\nHost: $HOSTALIAS$\nHost Group: $HOSTGROUP$\nAddress:
$HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time:
$LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$" | /bin/mail -s
"** $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is
$SERVICESTATE$ **" $CONTACTEMAIL$
}
Any help is much appreciated?
Jeremy
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
variable when using a command like host-notify-by-email, or
notify-by-email. I would like the notification to show which hostgroup
the affected host belongs to?
The following does not work:
define command{
command_name notify-by-email
command_line /usr/bin/printf "%b" "***** Nagios-MCI
*****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService:
$SERVICEDESC$\nHost: $HOSTALIAS$\nHost Group: $HOSTGROUP$\nAddress:
$HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time:
$LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$" | /bin/mail -s
"** $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is
$SERVICESTATE$ **" $CONTACTEMAIL$
}
Any help is much appreciated?
Jeremy
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]