check_snmp for temperature | w and c set

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
adrian.fejos
Posts: 3
Joined: Tue Jul 30, 2013 4:58 am

check_snmp for temperature | w and c set

Post by adrian.fejos »

Hello,
I have a temperature thermometer model P8510 - Intelligent Ethernet Thermometer (http://www.cometsystem.cz/)
I want to monitor this in Nagios. My command looks like this:
./check_snmp -H 10.xxx.xxx.xxx -P 1 -o enterprises.22626.1.5.2.1.2.0 -C public
SNMP OK - "18.8" |
I don't know how to set the warning and critical state. I have tried with -w 30:25 but it's not working.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: check_snmp for temperature | w and c set

Post by slansing »

What does the check return when you add a "-w" or "-c" with no values after them? Have you tried adding a hard value for each?:

Code: Select all

-w 20 -c 40
Add them after your OID definition.
adrian.fejos
Posts: 3
Joined: Tue Jul 30, 2013 4:58 am

Re: check_snmp for temperature | w and c set

Post by adrian.fejos »

If I add -w or -c I get the same message SNMP OK -....
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: check_snmp for temperature | w and c set

Post by abrist »

Well, you should not get a warning nor critical if the temp value is less than 20.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
adrian.fejos
Posts: 3
Joined: Tue Jul 30, 2013 4:58 am

Re: check_snmp for temperature | w and c set

Post by adrian.fejos »

abrist wrote:Well, you should not get a warning nor critical if the temp value is less than 20.
If I add -w 18 or -w "18" or -w '18' I still don't get an Warning state.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: check_snmp for temperature | w and c set

Post by sreinhardt »

Let's just try something to be sure it is working properly, although my guess is that it drops the decimal place, and only sends alerts for greater than the values specified. Try using "-w 10 -c 18"
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Locked