bmccorkle / check_ups_status.pl

Monitoring Plugin to check UPS Status for Vertiv and Tripplite UPS's
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

No usefull error message in case of SNMP failure #2

Closed flohoff closed 2 years ago

flohoff commented 2 years ago

Hi, when SNMP communication does not work with the Vertiv controller there is no really useful error message. Its just the typical perl gibberish of not defined variables. Would be nice to eliminate the perl error messages and print an CRITICAL No SNMP response.


Use of uninitialized value in string eq at /usr/local/lib/nagios/plugins/check_ups_status.pl line 653.
Use of uninitialized value in string eq at /usr/local/lib/nagios/plugins/check_ups_status.pl line 703.
Use of uninitialized value in string eq at /usr/local/lib/nagios/plugins/check_ups_status.pl line 732.
Use of uninitialized value in string eq at /usr/local/lib/nagios/plugins/check_ups_status.pl line 747.
Use of uninitialized value in numeric ne (!=) at /usr/local/lib/nagios/plugins/check_ups_status.pl line 758.
Use of uninitialized value in string eq at /usr/local/lib/nagios/plugins/check_ups_status.pl line 779.
Use of uninitialized value in string eq at /usr/local/lib/nagios/plugins/check_ups_status.pl line 794.
Use of uninitialized value in string eq at /usr/local/lib/nagios/plugins/check_ups_status.pl line 824.
Use of uninitialized value in numeric eq (==) at /usr/local/lib/nagios/plugins/check_ups_status.pl line 851.
Use of uninitialized value in numeric eq (==) at /usr/local/lib/nagios/plugins/check_ups_status.pl line 855.
Use of uninitialized value in numeric eq (==) at /usr/local/lib/nagios/plugins/check_ups_status.pl line 858.
Use of uninitialized value in numeric eq (==) at /usr/local/lib/nagios/plugins/check_ups_status.pl line 862.
Use of uninitialized value in numeric eq (==) at /usr/local/lib/nagios/plugins/check_ups_status.pl line 868.
Use of uninitialized value in numeric eq (==) at /usr/local/lib/nagios/plugins/check_ups_status.pl line 872.
Use of uninitialized value in numeric eq (==) at /usr/local/lib/nagios/plugins/check_ups_status.pl line 876.
Use of uninitialized value in numeric eq (==) at /usr/local/lib/nagios/plugins/check_ups_status.pl line 879.
Use of uninitialized value in numeric eq (==) at /usr/local/lib/nagios/plugins/check_ups_status.pl line 883.
Use of uninitialized value in numeric eq (==) at /usr/local/lib/nagios/plugins/check_ups_status.pl line 887.
Use of uninitialized value in numeric eq (==) at /usr/local/lib/nagios/plugins/check_ups_status.pl line 891.
Use of uninitialized value $load_percent in numeric ge (>=) at /usr/local/lib/nagios/plugins/check_ups_status.pl line 910.
Use of uninitialized value $load_percent in numeric ge (>=) at /usr/local/lib/nagios/plugins/check_ups_status.pl line 918.
Use of uninitialized value $charge_remain in numeric le (<=) at /usr/local/lib/nagios/plugins/check_ups_status.pl line 946.
Use of uninitialized value in numeric ne (!=) at /usr/local/lib/nagios/plugins/check_ups_status.pl line 1327.
Use of uninitialized value in string eq at /usr/local/lib/nagios/plugins/check_ups_status.pl line 1256.

CRITICAL - |
bmccorkle commented 2 years ago

I've updated the error handling and this should be corrected in the next release for the conditions I was able to check for.

bmccorkle commented 2 years ago

Should be resolved in 1.1.0.