riskersen / Monitoring

Monitoring plugins wich are Nagios/icinga compatible
65 stars 112 forks source link

UPS/check_ups_apc.pl: Fix to prevent warnings for usage of "given" and "when" #48

Closed mhoogveld closed 3 years ago

mhoogveld commented 5 years ago

Fix for issue-46: Warnings on STDOUT regarding usage of experimental "given" and "when" keywords

Replaced usage of given/when with if/else constructs. Now returning "UNKNOWN" when an undefined or empty snmp-value is checked against thresholds instead of returning CRITICAL. Fixed some indentation regarding mixed usage of tabs and spaces

riskersen commented 4 years ago

I recommend to use a more recent perl version. Thanks for the contribution anyways!