Problem with critical thereshold

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
r3s
Posts: 1
Joined: Thu Jan 09, 2014 4:57 am

Problem with critical thereshold

Post by r3s »

Hello,
I have problem with critical thereshold. I would like check FAN in my device and i know that SNMP string from 9000 to 11000 is OK (9000,11000) and another value is critical.
My configuration don`t work and I don`t want why, i check my configuration with https://nagios-plugins.org/doc/guidelines.html

Code: Select all

define service{
        use                     generic-service
        host_name               HOSTNAME
        service_description     FAN
        check_command           check_snmp!-P 2c -C publictest -o X.X.X.X.X.X.X.X.X.X.X.X.X -c 9000:11000 -r SNMP OK - \d{0}
        }
For example my status is critical for 8211, 9321 and 12121. It should be OK for 9321 value.

What it is "-r" and this command "-r SNMP OK - \d{0}"?


Table 3. Example ranges

Range definition

Generate an alert if x...

10 < 0 or > 10, (outside the range of {0 .. 10})
10: < 10, (outside {10 .. ∞})
~:10 > 10, (outside the range of {-∞ .. 10})
10:20 < 10 or > 20, (outside the range of {10 .. 20})
@10:20 ≥ 10 and ≤ 20, (inside the range of {10 .. 20})
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Problem with critical thereshold

Post by sreinhardt »

Your critical range looks good as far as the range you wish to have notify and not. However if you are getting a string back instead of an int, it would not compare correctly. What result do you get if you run this via cli?
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