Skip to content

Commit

Permalink
Add check for undefined value before testing
Browse files Browse the repository at this point in the history
  • Loading branch information
waipeng committed May 8, 2015
1 parent e120f6a commit 3c38533
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion check_netapp_ontap.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 3c38533

Please sign in to comment.