From 3c385337df3224b79b38eec78396d0666192c1fb Mon Sep 17 00:00:00 2001 From: Jake Yip Date: Fri, 8 May 2015 14:22:57 +1000 Subject: [PATCH] Add check for undefined value before testing --- check_netapp_ontap.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/check_netapp_ontap.pl b/check_netapp_ontap.pl index caf4edb..99650be 100644 --- a/check_netapp_ontap.pl +++ b/check_netapp_ontap.pl @@ -1017,7 +1017,8 @@ sub get_snap_space { $strVolName = $strVolOwner . "/" . $strVolName; # Don't monitor a volume that is currently being moved as it will result in errors. - if ($nahVol->child_get("volume-state-attributes")->child_get_string("is-moving") eq "true") { + if (defined($nahVol->child_get("volume-state-attributes")->child_get_string("is-moving")) && + $nahVol->child_get("volume-state-attributes")->child_get_string("is-moving") eq "true") { next; }