lausser / check_nwc_health

nwc = network component. This plugin checks lots of aspects of routers, switches, wlan controllers, firewalls,.....
http://labs.consol.de/nagios/check_nwc_health
GNU General Public License v2.0
148 stars 88 forks source link

uninitialized value in string when using --mode hardware-health on Nexus 7k with version 3.1 #30

Closed 0xJasonMurray closed 9 years ago

0xJasonMurray commented 9 years ago

After upgrading to version 3.1 all our Cisco Nexus 7k switches are throwing the following error:

jemurray@nagios:~$ /usr/lib/nagios/plugins/check_nwc_health --community public --hostname ncdc-nx7k-0.example.com --mode hardware-health Use of uninitialized value in string eq at /usr/lib/nagios/plugins/check_nwc_health line 4950. Use of uninitialized value in string eq at /usr/lib/nagios/plugins/check_nwc_health line 4982. .....

I tracked it down to this variable:

$self->{entSensorThresholdEvaluation}

It is undefined when the script runs.

Switch version:

I am a Cisco NX-OS(tm) n7000, Software (n7000-s2-dk9), Version 6.2(8b), RELEASE SOFTWARE Copyright (c) 2002-2013 by Cisco Systems, Inc. Compiled 10/6/2014 14:00:00

I also tested with the latest release ($Revision: 3.2) from github and the problem still exists.

Let me know what additional information you need from me?

Full output of the script run normally:

jemurray@selleck:~$ /usr/lib/nagios/plugins/check_nwc_health --community public --hostname ncdc-nx7k-0.example.com --mode hardware-health Use of uninitialized value in string eq at /usr/lib/nagios/plugins/check_nwc_health line 4950. Use of uninitialized value in string eq at /usr/lib/nagios/plugins/check_nwc_health line 4982. Use of uninitialized value in string eq at /usr/lib/nagios/plugins/check_nwc_health line 4950. Use of uninitialized value in string eq at /usr/lib/nagios/plugins/check_nwc_health line 4982. Use of uninitialized value in string eq at /usr/lib/nagios/plugins/check_nwc_health line 4950. Use of uninitialized value in string eq at /usr/lib/nagios/plugins/check_nwc_health line 4982. Use of uninitialized value in string eq at /usr/lib/nagios/plugins/check_nwc_health line 4950. Use of uninitialized value in string eq at /usr/lib/nagios/plugins/check_nwc_health line 4982. Use of uninitialized value in string eq at /usr/lib/nagios/plugins/check_nwc_health line 4950. Use of uninitialized value in string eq at /usr/lib/nagios/plugins/check_nwc_health line 4982. Use of uninitialized value in string eq at /usr/lib/nagios/plugins/check_nwc_health line 4950. Use of uninitialized value in string eq at /usr/lib/nagios/plugins/check_nwc_health line 4982. Use of uninitialized value in string eq at /usr/lib/nagios/plugins/check_nwc_health line 4950. Use of uninitialized value in string eq at /usr/lib/nagios/plugins/check_nwc_health line 4982. Use of uninitialized value in string eq at /usr/lib/nagios/plugins/check_nwc_health line 4950. Use of uninitialized value in string eq at /usr/lib/nagios/plugins/check_nwc_health line 4982. Use of uninitialized value in string eq at /usr/lib/nagios/plugins/check_nwc_health line 4950. Use of uninitialized value in string eq at /usr/lib/nagios/plugins/check_nwc_health line 4982. Use of uninitialized value in string eq at /usr/lib/nagios/plugins/check_nwc_health line 4950. Use of uninitialized value in string eq at /usr/lib/nagios/plugins/check_nwc_health line 4982. Use of uninitialized value in string eq at /usr/lib/nagios/plugins/check_nwc_health line 4950. Use of uninitialized value in string eq at /usr/lib/nagios/plugins/check_nwc_health line 4982. Use of uninitialized value in string eq at /usr/lib/nagios/plugins/check_nwc_health line 4950. Use of uninitialized value in string eq at /usr/lib/nagios/plugins/check_nwc_health line 4982. Use of uninitialized value in string eq at /usr/lib/nagios/plugins/check_nwc_health line 4950. Use of uninitialized value in string eq at /usr/lib/nagios/plugins/check_nwc_health line 4982. Use of uninitialized value in string eq at /usr/lib/nagios/plugins/check_nwc_health line 4950. Use of uninitialized value in string eq at /usr/lib/nagios/plugins/check_nwc_health line 4982. Use of uninitialized value in string eq at /usr/lib/nagios/plugins/check_nwc_health line 4950. Use of uninitialized value in string eq at /usr/lib/nagios/plugins/check_nwc_health line 4982. OK - environmental hardware working fine | 'sens_celsius_21590'=16;42;60;; 'sens_celsius_21591'=32;60;80;; 'sens_celsius_21592'=39;95;105;; 'sens_celsius_21593'=28;95;105;; 'sens_celsius_21594'=35;95;105;; 'sens_celsius_21595'=33;70;85;; 'sens_celsius_21596'=32;70;85;; 'sens_celsius_21597'=34;70;85;; 'sens_celsius_21598'=29;70;85;; 'sens_celsius_21599'=29;70;85;; 'sens_celsius_21600'=27;70;85;; 'sens_celsius_21601'=29;70;85;; 'sens_celsius_21602'=24;70;85;; 'sens_celsius_21719'=27;105;115;; 'sens_celsius_21720'=26;105;115;; 'sens_celsius_21721'=28;105;115;; 'sens_celsius_21722'=35;105;115;; 'sens_celsius_21723'=39;105;115;; 'sens_celsius_21724'=42;105;115;; 'sens_celsius_21725'=23;105;115;; 'sens_celsius_21726'=24;105;115;; 'sens_celsius_21727'=20;105;115;; 'sens_celsius_21728'=34;105;115;; 'sens_celsius_21729'=24;105;115;; 'sens_celsius_21730'=21;105;115;; 'sens_celsius_21731'=61;105;115;; 'sens_celsius_21732'=61;105;115;; 'sens_celsius_21733'=52;105;115;; 'sens_celsius_21734'=52;105;115;; 'sens_celsius_21735'=58;105;115;; 'sens_celsius_21736'=58;105;115;; 'sens_celsius_21737'=41;105;115;; 'sens_celsius_21738'=41;105;115;; 'sens_celsius_21739'=64;105;115;; 'sens_celsius_21740'=64;105;115;; 'sens_celsius_21741'=63;105;115;; 'sens_celsius_21742'=63;105;115;; 'sens_celsius_21743'=55;105;115;; 'sens_celsius_21744'=55;105;115;; 'sens_celsius_21745'=49;105;115;;

lausser commented 9 years ago

It's fixed now

0xJasonMurray commented 9 years ago

Thank you. I tested it and it works great.

It's fixed now

— Reply to this email directly or view it on GitHub https://github.com/lausser/check_nwc_health/issues/30#issuecomment-67710068 .