ladies and gentlemen, need to do the check_snmp the nagios return critical and negative numbers .
As follows , Nagios runs the plugin if the return is greater than -70 , for example -71 it alarms critical .
code:
/usr/local/nagios/libexec/check_snmp -H 10.255.255.131 -C public -o .1.3.6.1.4.1.14988.1.1.1.2.1.13.76.94.12.131.149.185.9 -c -78,-79
return :
Range format incorrect
how can I make him read these negative numbers?
check_snmp how to read negative numbers
-
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: check_snmp how to read negative numbers
Can you try this patch and see if it helps you? If it does maybe I'll talk to the developers about getting it in and doing a minor revision of plugins package.
http://sourceforge.net/p/nagiosplug/bugs/548/
http://sourceforge.net/p/nagiosplug/bugs/548/
-
- Posts: 49
- Joined: Thu Feb 14, 2013 9:32 am
Re: check_snmp how to read negative numbers
Hi
I use SNMP Inverter to monitor my UPS: http://mihai.radoveanu.ro/my-plugins/ch ... -inverter/
This plugin is able to trigger Nagios alerts and Service Status if a read number is below the specified.
COMMANDS.cfg:
SERVICE DEFINITION on HOSTX.cfg
In the service example given, the battery level trigger for warning is 80% and critical is 60%.
Hope that this will be usefull to you.
Warm regards!
I use SNMP Inverter to monitor my UPS: http://mihai.radoveanu.ro/my-plugins/ch ... -inverter/
This plugin is able to trigger Nagios alerts and Service Status if a read number is below the specified.
COMMANDS.cfg:
Code: Select all
define command {
command_name check_snmp_inverter
command_line $USER1$/check_snmp_inverter.sh -H $HOSTADDRESS$ -C $ARG1$ -o $ARG2$
}
Code: Select all
define service{
use generic-service
host_name UPS-XPTO
service_description Battery Charge Level
check_command check_snmp_inverter!public!1.3.6.1.2.1.33.1.2.4.0 -w 80 -c 60 -u %
}
Hope that this will be usefull to you.
Warm regards!
Re: check_snmp how to read negative numbers
Thanks DiegoAnjos for the post. Hope it helps.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: check_snmp how to read negative numbers
Hi all,
I had a similar problem and found some solution. I am running Nagios XI 5.4.4
I wanted to read optical transmit and received power (negative values in dBm), with these tresholds:
warning from -60 to -70
critical from -70 to -00 (negative indefinitely).
I formed my command like this:
$USER1$/check_snmp -H $HOSTADDRESS$ -o $ARG1$ -C public -w -60: -c -70:
This way, Nagios successfully processed negative values.
Also, some potentially useful links:
https://nagios-plugins.org/doc/guidelines.html
https://sourceforge.net/p/nagiosplug/bugs/548/
Hope this will help someone.
I had a similar problem and found some solution. I am running Nagios XI 5.4.4
I wanted to read optical transmit and received power (negative values in dBm), with these tresholds:
warning from -60 to -70
critical from -70 to -00 (negative indefinitely).
I formed my command like this:
$USER1$/check_snmp -H $HOSTADDRESS$ -o $ARG1$ -C public -w -60: -c -70:
This way, Nagios successfully processed negative values.
Also, some potentially useful links:
https://nagios-plugins.org/doc/guidelines.html
https://sourceforge.net/p/nagiosplug/bugs/548/
Hope this will help someone.
Re: check_snmp how to read negative numbers
Thanks for the info, but this thread is quite old so I will be closing it now.
Former Nagios employee