Hi, we are really confused to to implement a range for critical condition. All we want is only critical if the received value is 2.
Couldn't get it done using the Nagios document.
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})
20:10 Inclusive of 10 to 20
Thanks
Tom
specify critical range for check_snmp script
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: specify critical range for check_snmp script
Does setting just -c 2 not work for you? It would seem that the check command accepts this just fine without -w.
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.
Re: specify critical range for check_snmp script
Hi, no -c 2 still returns OK if the value is 2.
Tom
Tom
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: specify critical range for check_snmp script
My mistake Tom, -c is for specifying what will not result in a critical. How about "-c :1 or 3:" meaning 1 or less, or, 3 or higher are not critical. This should just leave 2 as a critical causing return. You might have to wrap that in double or single quotes such as -c ':1 or 3:' or -c ":1 or 3:".
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.
Re: specify critical range for check_snmp script
Hi, the -c :1 or 3: works.
Thanks
Tom
Thanks
Tom
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: specify critical range for check_snmp script
you are most welcome, thank you for letting us know!
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.