mcktr / check_fritz

Check plugin written in Go to monitor a Fritz!Box
GNU General Public License v2.0
32 stars 10 forks source link

Implement threshold ranges #101

Open MarcusCaepio opened 3 years ago

MarcusCaepio commented 3 years ago

Hi, I noticed, that thresholds are not supported in the uptime checks. Imho, I should be able to get an alert, when -c < -w < value. E.g. critical when uptime < 10m ; warning when uptime < 15m

Cheers, Marcus

mcktr commented 3 years ago

Hi,

thanks for the feature request, this is a good idea for an enhancement. :+1:

Are you sure about the comparison "direction" i.e. warning/critical when value is bigger? Shouldn't it be the other way around, so someone gets notified when the box restarts unexpectedly?

Best regards Michael

MarcusCaepio commented 3 years ago

Indeed, you are right ^^ But on the other side, using ranges would make sense, too. Using ranges like defined in https://nagios-plugins.org/doc/guidelines.html#THRESHOLDFORMAT, a given tresh like X:Y could check if the uptime is < X (suddenly reboot) and uptime > Y (running for a long time without reboot)