command_line if [ "$NOTIFICATIONTYPE$" = "PROBLEM" -o "$NOTIFICATIONTYPE$" = "RECOVERY" -o "$NOTIFICATIONTYPE$" = "ACKNOWLEDGEMENT" ]; then /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $DATETIME$\n\nAdditional Info:\n\n$OUTPUT$" | /bin/mail -s "** $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$; fi
Tuesday, February 21, 2012
Stop nagios downtime alert spam
If you're like me and find the nagios alerts declaring when scheduled downtime starts and ends annoying, try wrapping your notify command in an if block:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment