diff --git a/check_vmware_ntp.pl b/check_vmware_ntp.pl index 4f0227a..63ff3b3 100644 --- a/check_vmware_ntp.pl +++ b/check_vmware_ntp.pl @@ -148,10 +148,10 @@ $ret = 2; } elsif ( abs($drift) > $warn) { $msg .= $host->get_property('summary.config.name') . " is " . ($drift) . " seconds off!"; - $ret = 1; + $ret = 1 if ($ret != 2); } else { $msg .= $host->get_property('summary.config.name') . " is within allowable drift (" . ($drift) . "s)"; - $ret = 0; + $ret = 0 if ($ret != 1 || $ret != 2 ); } if ( $ntp_srv_count > $peer_warn )