I’m trying to make an alert on nagios for capacity of my batteries in the field. I wrote the command like below:
command_line /usr/local/nagios/libexec/check_snmp -H $HOSTADDRESS$ -C public -v 1 -o 220.127.116.11.4.1.18063.2.30.18.0 -l Voltage -c 11:10 -u Volts
and the monitoring device is giving me the decimal floating number like below:
iso.18.104.22.168.1.18063.2.30.18.0 = STRING: “13.5”
Voltage OK - 13 Volts | iso.22.214.171.124.1.18063.2.30.18.0=13
my question is how can I write a critical range using decimal floating point, to be more accurate. Or if could somebody tell me where in the check_snmp.c script I could change the output to be multiplied be 10, in order for me to get the value 135 instead of 13.5?