Macros in notification e-mails appear URL encoded
Posted: Tue Mar 12, 2013 5:28 am
Hi. We're experiencing a problem with our Nagios installation that seems to have occurred since we upgraded from 3.4.1 to 3.4.4.
We have host and service notifications configured with the default option, here's the configuration for the service notifications:
However, when the notification e-mail arrives, it appears like this:
Any advice would be appreciated.
Many thanks.
We have host and service notifications configured with the default option, here's the configuration for the service notifications:
Code: Select all
# '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$" | /bin/mail -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
}
I've packet captured the SMTP traffic coming from the 'Nagios server' (CentOS 5.2 with sendmail) and can see the URL encoding so can confirm that it doesn't appear to be anything further down the line in our e-mail system.From: [email protected]
Sent: 12 March 2013 00:40
To: Joe User
Subject: ** PROBLEM Service Alert: %5Bexternalserver%5D+External+FTP+/+web+server//var/www Filesystem is CRITICAL **
***** Nagios *****
Notification Type: PROBLEM
Service: /var/www Filesystem
Host: %5Bexternalserver%5D+External+FTP+/+web+server
Address: 1.2.3.4
State: CRITICAL
Date/Time: Tue+Mar+12+00:39:44+GMT+2013
Additional Info:
CRITICAL - Plugin timed out after 10 seconds
Any advice would be appreciated.
Many thanks.