Dear CheckMK forum users,
I seem to have a problem with understanding lower and upper thresholds in local checks.
Systeminfo
- CheckMK 2.0.0p16 CEE
- Ubuntu 20.04
The problem
I’m writing a check for an APC UPS without SNMP (connected via USB Cable to Debian OS.
There is a little something in the CheckMK Exchange but it is not quite what we wanted to have, so I started to write my own local check.
For the battery_charge
metric, I’d need to have lower thresholds instead of upper thresholds because a full battery is not a problem, an empty one is.
I have been following the CheckMK Local Check Docs, which states the following as accepted output for lower-only WARN/CRIT:
P "My 4th dynamic service" count_lower=37;40:;30: A service with lower thresholds only
Here is my local check output + how CheckMK sees this (on the details page of the service)
# local check output
P "USV Charge" battery_capacity=100.0;50:;25:|voltage=231.8 Battery: 100.0 Percent\nBCHARGE: 100.0 Percent\nOUTPUTV: 231.8 Volts
# Service performance data (source code)
battery_capacity=100;;;;
As you can see, CheckMK doesn’t accept the lower-only thresholds.
The same happens if I drop the voltage metric:
# local check output
P "USV Charge" battery_capacity=100.0;50:;25: Battery: 100.0 Percent\nBCHARGE: 100.0 Percent\nOUTPUTV: 231.8 Volts
# Service performance data (source code)
battery_capacity=100;;;;
If I set warn_high
and crit_high
to some values, the lower thresholds are ignored by CheckMK:
# local check output
P "USV Charge" battery_capacity=100.0;50:110;25:110|voltage=231.8 Battery: 100.0 Percent\nBCHARGE: 100.0 Percent\nOUTPUTV: 231.8 Volts
# Service performance data (source code)
battery_capacity=100;110;110;;
Did I do something wrong and didn’t see it?
Are the docs outdated?
Are upper and lower limits not a thing anymore?
If so, how else would I set limits for battery charges and general lower-bounds limits?
Thank you for taking the time to read and help.
Best regards,
pixelpoint