Просмотр исходного кода

Update check_ntp.pl

fix performance output
DarkNinja77 2 лет назад
Родитель
Сommit
86d333e676
1 измененных файлов с 2 добавлено и 1 удалено
  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");
 		}