Przeglądaj źródła

Update check_ntp.pl

fix performance output
DarkNinja77 2 lat temu
rodzic
commit
86d333e676
1 zmienionych plików z 2 dodań i 1 usunięć
  1. 2 1
      plugins-scripts/check_ntp.pl

+ 2 - 1
plugins-scripts/check_ntp.pl

@@ -427,7 +427,8 @@ if ($ntpdate_error != $ERRORS{'OK'}) {
 
 foreach my $key (keys %ERRORS) {
 	if ($state==$ERRORS{$key}) {
-		print ("NTP $key: $answer|offset=$offset");
+ 		$offset =~ s/\+//;
+		print ("NTP $key: $answer|offset=".$offset."s;$owarn;$ocrit;;");
 		if ($have_ntpq) {
 			print (", jitter=" . $jitter/1000 .	",peer_stratum=$stratum");
 		}