Email notification for service/host alerts issue ?
Mirza Dedic
mirde at oppy.com
Thu Aug 19 16:55:28 CEST 2010
Recently I upgraded my Nagios OS from Ubuntu 8.04 to 10.04, everything works as expected except my alerts are not bringing in the "$HOSTOUTPUT$" data. Basically this is what I get in my notification alert:
** PROBLEM Service Alert: van-oooo/service_SMS_SITE_COMPONENT_MANAGER is CRITICAL **
***** Nagios *****
Notification Type: PROBLEM
Service: service_SMS_SITE_COMPONENT_MANAGER
Host: van-oooo
Address: 172.16.x.x
State: CRITICAL
Date/Time: Thu Aug 19 07:51:02 PDT 2010
Additional Info:
The additional info is missing, below are my notification commands, this used to work prior to upgrading.
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$
}
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$
}
Any idea why this could be happening?
Thanks.
_____________________________________________________________
Mirza Dedic | Senior Technical Analyst/DBA - IT | mirde at oppy.com<mailto:seach at oppy.com> | (O) 604-461-6779 (C) 778.895.8950
P Please consider the environment before printing this email.
The Oppenheimer Group ---- CONFIDENTIAL
This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20100819/83315a48/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
This SF.net email is sponsored by
Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list