Page 1 of 1

Problem with critical thereshold

Posted: Wed Mar 12, 2014 5:20 pm
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})

Re: Problem with critical thereshold

Posted: Thu Mar 13, 2014 10:11 am
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?