Use of uninitialized value $ok_msg(..) in check_cdot_aggr.pl
Closed this issue · 1 comments
When warning/critical thresholds for check_cdot_aggr.pl are not met:
[root@netapp_cluster ~]# /usr/local/nagios/libexec/check_cdot_aggr.pl --hostname netapp_cluster --username nagios --password $PASS --warning 80 --critical 90 -aggr of_n1_aggr001_rP
CRITICAL: of_n1_aggr001_rP (95%)Use of uninitialized value $ok_msg in concatenation (.) or string at /usr/local/nagios/libexec/check_cdot_aggr.pl line 167.
OK:
[root@nagios ~]# echo $?
2
[root@nagios ~]#
This strange behavior goes for WARNING states too.
All goes smooth when results are within thesholds:
[root@nagios ~]# /usr/local/nagios/libexec/check_cdot_aggr.pl --hostname netapp_cluster --username nagios --password $PASS --warning 96 --critical 97 -aggr of_n1_aggr001_rP
OK: of_n1_aggr001_rP (95%)
[root@nagios ~]# echo $?
0
[root@nagios ~]#
Fixed it.
I think I haven't got this problems, because all my systems have >= 10 aggregates, and there is one with OK-status anytime :-)