LONGDATETIME return $

kakikubo teruo kakikubo at gmail.com
Fri Nov 9 16:50:28 CET 2007


Hi

> 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 :
> 
> # 'host-notify-by-email' command definition
> define command{
>         command_name    host-notify-by-email
>         command_line    /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTALIAS$\nState: $HOSTSTATE$ for $HOSTDURATION$\nAddress: $HOSTADDRESS$\nInfo:\n\n$HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n\nACK by: $HOSTACKAUTHOR$\nComment: $HOSTACKCOMMENT$\n" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ alert $NOTIFICATIONNUMBER$ - $HOSTALIAS$ host is $HOSTSTATE$ **" $CONTACTEMAIL$
>         }

If described as shown in the above-mentioned , 
It is sure to become the following formats 

    ***** Nagios *****

    Notification Type: $NOTIFICATIONTYPE$
    Host: $HOSTALIAS$
    State: $HOSTSTATE$ for $HOSTDURATION$
    Address: $HOSTADDRESS$
    Info:

    $HOSTOUTPUT$

    Date/Time: $LONGDATETIME$

    ACK by: $HOSTACKAUTHOR$
    Comment: $HOSTACKCOMMENT$


> # '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$
>         }

This is sure to become as follows, too. 

    ***** Nagios  *****

    Notification Type: $NOTIFICATIONTYPE$

    Service: $SERVICEDESC$
    Host: $HOSTALIAS$
    State: $SERVICESTATE$ for $SERVICEDURATION$
    Address: $HOSTADDRESS$

    Info:

    $SERVICEOUTPUT$

    Date/Time: $LONGDATETIME$

    ACK by: $SERVICEACKAUTHOR$
    Comment: $SERVICEACKCOMMENT$

I think that another notification settings caused the problem . 


> Thanks for your help!
> 
> PS/ Sorry for my english :-)

me too... :-(

------
kakikubo

-------------------------------------------------------------------------
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