LONGDATETIME return $

Marc Powell marc at ena.com
Fri Nov 9 16:54:01 CET 2007



> -----Original Message-----
> From: nagios-users-bounces at lists.sourceforge.net [mailto:nagios-users-
> bounces at lists.sourceforge.net] On Behalf Of Sylvain Viollat
> Sent: Friday, November 09, 2007 8:09 AM
> To: Nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] LONGDATETIME return $
> 
> 
> Hello,
> 
> on a fresh install of Nagios 2.6 on Debian Etch, I got a strange
problem
> that I never see before. When I receive mail notifications for an
alert,
> the Date/Time in the Email body return $. Here is an example :
> 
> ***** Nagios  *****
> 
> Notification Type: PROBLEM
> 
> Service: Test Nagios
> Host: firewall
> Address: 192.168.1.1
> State: CRITICAL
> 
> Date/Time: $
> 
> Additional Info:
> 
> Connection refused
> 
> But when I receive an email for a "host down" notification, the
Date/Time
> appear !? Here is what I got in commands.cfg :
> 
> # 'notify-by-email' command definition
> define command{
>         command_name    notify-by-email
>         command_line    /usr/bin/printf "%b" "***** Nagios
> *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService:
> $SERVICEDESC$\nHost: $HOSTALIAS$\nState: $SERVICESTATE$ for
> $SERVICEDURATION$\nAddress:
> $HOSTADDRESS$\n\nInfo:\n\n$SERVICEOUTPUT$\n\nDate/Time:
> $LONGDATETIME$\n\nACK by: $SERVICEACKAUTHOR$\nComment:
> $SERVICEACKCOMMENT$\n" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ alert
> $NOTIFICATIONNUMBER$ - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **"
> $CONTACTEMAIL$
>         }

Are you _sure_ this is the notification command being used? The reason I
ask is that you appear to be using the macro correctly but this is an
issue that has only ever been seen when the wrong macro is used (i.e.
$DATETIME$ from nagios-1.x). For some reason I'm under the impression
that the debian packages are shipped with incorrect macros used. Did you
have to change them? Did you restart nagios after and verify that there
is only one nagios daemon running?

--
Marc

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
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