Hello, I am having some problems getting some services to go critical when a threshold is reached. Particularly ups battery capacity $USER1$/check_snmp -H $HOSTADDRESS$ $ARG1$ -o .1.3.6.1.4.1.318.1.1.1.2.2.1.0 -c 35 -l'\Battery Charge\' -u '\%\'
I have tried different configuration with the -c 35 and changing it to -c 75 but once this service is applied all the batteries monitored go red with critical warnings even if they are at 100%. Any help would be greatly appreciated.
Chris
Problem with monitoring some APC oids
Re: Problem with monitoring some APC oids
/usr/local/nagios/libexec/check_snmp -h
- Ranges are inclusive and are indicated with colons. When specified as
'min:max' a STATE_OK will be returned if the result is within the indicated
range or is equal to the upper or lower bound. A non-OK state will be
returned if the result is outside the specified range.
- If specified in the order 'max:min' a non-OK state will be returned if the
result is within the (inclusive) range.
- Upper or lower bounds may be omitted to skip checking the respective limit.
- Bare integers are interpreted as upper limits.
- When checking multiple OIDs, separate ranges by commas like '-w 1:10,1:,:20'
So -c 35 indicates any value below 35 is OK. That is an odd way of explaining it, as -w 35 -c 75 would cause any thing below 35 to be OK and anything below 75 to be Warning. I guess instead of OK they should say one status level better/lower.
- Ranges are inclusive and are indicated with colons. When specified as
'min:max' a STATE_OK will be returned if the result is within the indicated
range or is equal to the upper or lower bound. A non-OK state will be
returned if the result is outside the specified range.
- If specified in the order 'max:min' a non-OK state will be returned if the
result is within the (inclusive) range.
- Upper or lower bounds may be omitted to skip checking the respective limit.
- Bare integers are interpreted as upper limits.
- When checking multiple OIDs, separate ranges by commas like '-w 1:10,1:,:20'
So -c 35 indicates any value below 35 is OK. That is an odd way of explaining it, as -w 35 -c 75 would cause any thing below 35 to be OK and anything below 75 to be Warning. I guess instead of OK they should say one status level better/lower.
Re: Problem with monitoring some APC oids
Thank you this was a big help. this is the code I used and now it is showing the critical level on a test ups:
-o .1.3.6.1.4.1.318.1.1.1.2.2.1.0 -c 90:100 -l'\Battery Charge\' -u '\%\'
output:
ups_capacity Critical 1h 17m 56s 5/5 2010-05-18 10:43:13 Battery Charge CRITICAL - *64* %
Thanks again.
-o .1.3.6.1.4.1.318.1.1.1.2.2.1.0 -c 90:100 -l'\Battery Charge\' -u '\%\'
output:
ups_capacity Critical 1h 17m 56s 5/5 2010-05-18 10:43:13 Battery Charge CRITICAL - *64* %
Thanks again.