Variable Problem in notifications

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
bwen51
Posts: 3
Joined: Mon Jul 29, 2013 10:22 am

Variable Problem in notifications

Post 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
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Variable Problem in notifications

Post 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 "$".
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
bwen51
Posts: 3
Joined: Mon Jul 29, 2013 10:22 am

Re: Variable Problem in notifications

Post 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.
bwen51
Posts: 3
Joined: Mon Jul 29, 2013 10:22 am

Re: Variable Problem in notifications

Post by bwen51 »

Hello,

It was simply as that^^

Thanks again for the help.

Regards
Locked