Page 1 of 1

Variable Problem in notifications

Posted: Mon Jul 29, 2013 10:29 am
by bwen51
Hello,

I have Installed FAN and i meet this problem.

Here is th notification command:

/usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\nDate/Time: $DATE$ Additional Info : $SERVICEOUTPUT$" | /bin/mail -s "** $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$

Here is the mail I receive:

** PROBLEM alert - Automate/$ is $ **

***** Nagios *****

Notification Type: PROBLEM

Service: $
Host: Automate
Address: 192.168.1.6
State: $
Date/Time: 29-07-2013 Additional Info : $


I dont understand, service_description is present in services.cfg. I have try some things i have found on the net but nothing works..

Thanks for your help

Re: Variable Problem in notifications

Posted: Mon Jul 29, 2013 2:01 pm
by abrist
Is this a host notification, or service notification? I usually see this behavior when a service notification command is set to a host, resulting the service specific macros represented as "$".

Re: Variable Problem in notifications

Posted: Mon Jul 29, 2013 2:10 pm
by bwen51
Humm interesting, yeah it's a service notification, i ll check if it's well attributed to à service and not to the host tomorrow and i will not miss to say it to you. Thanks for answer.

Re: Variable Problem in notifications

Posted: Tue Jul 30, 2013 4:25 am
by bwen51
Hello,

It was simply as that^^

Thanks again for the help.

Regards