mcktr / check_tr64_fritz

Icinga 2 Plugin to check a Fritz!Box
GNU General Public License v2.0
29 stars 10 forks source link

Ensure that the processing of warning/critical values is correct #34

Closed mcktr closed 6 years ago

mcktr commented 6 years ago

After #29 is merged, we need to ensure that all (supported) functions are working correctly when warning/critical values are set.

This is necessary due a change on the internal check_greater function.

mcktr commented 6 years ago

Function that need tests

Tests

downstream

$ ./check_tr64_fritz -P <PASSWORD> -f downstream -w 90 -c 80
OK - Downstream 102 Mbit/s | downstream_rate=102 warn=90 crit=80

$ ./check_tr64_fritz -P <PASSWORD> -f downstream -w 105 -c 80
WARNING - Downstream 102 Mbit/s | downstream_rate=102 warn=105 crit=80

$ ./check_tr64_fritz -P <PASSWORD> -f downstream -w 110 -c 105
CRITICAL - Downstream 102 Mbit/s | downstream_rate=102 warn=110 crit=105

upstream

$ ./check_tr64_fritz -P <PASSWORD> -f upstream -w 18 -c 15
OK - Upstream 20 Mbit/s | upstream_rate=20 warn=18 crit=15

$ ./check_tr64_fritz -P <PASSWORD> -f upstream -w 21 -c 15
WARNING - Upstream 20 Mbit/s | upstream_rate=20 warn=21 crit=15

$ ./check_tr64_fritz -P <PASSWORD> -f upstream -w 25 -c 21
CRITICAL - Upstream 20 Mbit/s | upstream_rate=20 warn=25 crit=21

thermometer

$ ./check_tr64_fritz -P <PASSWORD> -f thermometer:2 -w 17 -c 15
OK - Comet DECT 03.68 - Küche CONNECTED 17.5 °C | thermometer_current_state=0 thermometer_current_temp=17.5 warn=17 crit=15

$ ./check_tr64_fritz -P <PASSWORD> -f thermometer:2 -w 17 -c 15
OK - Comet DECT 03.68 - Küche CONNECTED 17.5 °C | thermometer_current_state=0 thermometer_current_temp=17.5 warn=17 crit=15

$ ./check_tr64_fritz -P <PASSWORD> -f thermometer:2 -w 17 -c 15
OK - Comet DECT 03.68 - Küche CONNECTED 17.5 °C | thermometer_current_state=0 thermometer_current_temp=17.5 warn=17 crit=15