Custom Defined Variable Not Working
Posted: Wed May 13, 2015 11:12 am
Hello,
I am having problems with a variable I defined in a host template not being passed down to the host. I am trying to call the variable from a service.
My host is a radio and I am trying to use check_snmp to get the voltage value from it (I had it working on Nagios core before).
The host Radio1 uses RadioType1 which has the custom variables and defined.
The service call looks like this:
and $ARG1$ looks like this:
The command runs and I do get a good value from the Radio1 host but the performance data returns as
When it should be
I am not sure if the variables are being inherited with values of 0 or not at all. I need to be able to define custom thresholds for different types of radios as they are powered differently and I want to have just one Check Voltage Service.
I have been trying to figure this out for two days and I am out of ideas. Any help?
Thanks.
I am having problems with a variable I defined in a host template not being passed down to the host. I am trying to call the variable from a service.
My host is a radio and I am trying to use check_snmp to get the voltage value from it (I had it working on Nagios core before).
The host Radio1 uses RadioType1 which has the custom variables
Code: Select all
_voltage_warn = 23.5Code: Select all
_voltage_crit = 23The service call looks like this:
Code: Select all
$USER1$/check_snmp -H $HOSTADDRESS$ $ARG1$Code: Select all
-o .1.3.6.1.4.1.21703.1.7.2.4.0 -l"Voltage" -u"Volts" -w$_HOSTVOLTAGE_WARN$: -c$_HOSTVOLTAGE_CRIT$:Code: Select all
Voltage=27.287Volts;0;0;Code: Select all
Voltage=27.287Volts;23.5;23;I have been trying to figure this out for two days and I am out of ideas. Any help?
Thanks.