Free variable empty

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
sib
Posts: 111
Joined: Thu Dec 11, 2014 8:06 am

Free variable empty

Post by sib »

Hi

I defined a command which uses free variables

The commands looks like this

Code: Select all

/usr/bin/printf "%b" "***** Nagios Monitor XI Alert *****\n\n$_HOSTCUSTOM_MESSAGE$" | /bin/mail -s "Nagios Alert: $_HOSTCUSTOM_SUBJECT$" $CONTACTEMAIL$
Then I defined a service that uses that alert notification command and defined 2 free variables
Capture.PNG
When the alert comes it has a subject "Nagios Alert: $" It does not show the content of the free variable.

Nagios XI 5.4.13
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Free variable empty

Post by lmiltchev »

I haven't been able to recreate the issue in house.

If these are service free variables, instead of using the command below:

Code: Select all

/usr/bin/printf "%b" "***** Nagios Monitor XI Alert *****\n\n$_HOSTCUSTOM_MESSAGE$" | /bin/mail -s "Nagios Alert: $_HOSTCUSTOM_SUBJECT$" $CONTACTEMAIL$
you should be using:

Code: Select all

/usr/bin/printf "%b" "***** Nagios Monitor XI Alert *****\n\n$_SERVICECUSTOM_MESSAGE$" | /bin/mail -s "Nagios Alert: $_SERVICECUSTOM_SUBJECT$" $CONTACTEMAIL$
Can you show us the actual notification email, and the configuration file for the "problem" service?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked