Browse Source

changelog credit + Merge branch 'master' into 679-check_snmp-no-threshold

Sebastian Wolf 2 năm trước cách đây
mục cha
commit
e0895caf36
3 tập tin đã thay đổi với 8 bổ sung3 xóa
  1. 3 1
      NEWS
  2. 2 0
      THANKS.in
  3. 3 2
      plugins-scripts/check_ntp.pl

+ 3 - 1
NEWS

@@ -1,7 +1,9 @@
 This file documents the major additions and syntax changes between releases.
 
-2.4.7 2023-10-30
+2.4.7 2023-11-07
 	FIXES
+	check_ntp.pl: Fix warning/critical threshold information missing from performance data output (#735)
+	check_ntp.pl: Fix issues when NTP server has a positive time offset (#734)
 	check_snmp: Fixed issue where plugin returned OK for missin OID (#679)
 
 2.4.6 2023-08-01

+ 2 - 0
THANKS.in

@@ -93,6 +93,7 @@ Daniel Scott
 Daniël van Eeden
 Dann Frazier
 Darian Rackham
+DarkNinja77
 Dave Viner
 David Alden
 David Croft
@@ -143,6 +144,7 @@ Gianluca Varisco
 gino0631
 Grant Byers
 Greg Bowser
+Griffin Westerman
 Guenther Mair
 Guillaume Rousse
 Gunnar Beutner

+ 3 - 2
plugins-scripts/check_ntp.pl

@@ -214,7 +214,7 @@ while (<NTPDATE>) {
 		$stratum = $1;
 	}
 	
-	if (/(offset|adjust)\s+([-.\d]+)/i) {
+	if (/(offset|adjust)\s+([-+.\d]+)/i) {
 		$offset = $2;
 
 		# An offset of 0.000000 with an error is probably bogus. Actually,
@@ -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");
 		}