Commnds not being passed System Macros values
Posted: Thu Aug 24, 2017 12:39 pm
I have set up a couple of commands that are being executed in a Contact (one for Host, One for Service).
On one of my servers this works just fine, as expected. On another host which was "supposedly" set up identically, it will not pass the values of $HOSTNAME$, $HOSTNOTES$, $HOSTSTATE$, etc to these commands
Is there some sort of top secret toggle that needs to be flipped to allow the passing of these values within Nagios??
Here is my Command that I am trying to pass:
$USER1$/Send_Alert.pl -h $HOSTNAME$ -n $HOSTNOTES$ -s $HOSTSTATE$ -t $HOSTOUTPUT$
I dumped the hash and this is what I am getting:
First Test:
$VAR1 = 'n';
$VAR2 = '-s';
$VAR3 = 'h';
$VAR4 = 'apapmon16.wepex.net';
Second Test:
$VAR1 = 'n';
$VAR2 = '-s';
$VAR3 = 'h';
$VAR4 = 'apapmon16.wepex.net';
Third manual run of the command with supplied arguments (I did run this without the FQDN)
$VAR1 = 'n';
$VAR2 = 'NOTES';
$VAR3 = 'h';
$VAR4 = 'apapmon16';
$VAR5 = 's';
$VAR6 = 'CRITICAL';
$VAR7 = 't';
$VAR8 = 'Test';
On one of my servers this works just fine, as expected. On another host which was "supposedly" set up identically, it will not pass the values of $HOSTNAME$, $HOSTNOTES$, $HOSTSTATE$, etc to these commands
Is there some sort of top secret toggle that needs to be flipped to allow the passing of these values within Nagios??
Here is my Command that I am trying to pass:
$USER1$/Send_Alert.pl -h $HOSTNAME$ -n $HOSTNOTES$ -s $HOSTSTATE$ -t $HOSTOUTPUT$
I dumped the hash and this is what I am getting:
First Test:
$VAR1 = 'n';
$VAR2 = '-s';
$VAR3 = 'h';
$VAR4 = 'apapmon16.wepex.net';
Second Test:
$VAR1 = 'n';
$VAR2 = '-s';
$VAR3 = 'h';
$VAR4 = 'apapmon16.wepex.net';
Third manual run of the command with supplied arguments (I did run this without the FQDN)
$VAR1 = 'n';
$VAR2 = 'NOTES';
$VAR3 = 'h';
$VAR4 = 'apapmon16';
$VAR5 = 's';
$VAR6 = 'CRITICAL';
$VAR7 = 't';
$VAR8 = 'Test';