From 0b6423f9c99d9edf8c96fefd0f6c453859395aa1 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Mon, 30 Sep 2013 00:03:24 +0200 Subject: Import Nagios Plugins site Import the Nagios Plugins web site, Cronjobs, infrastructure scripts, and configuration files. --- web/attachments/177459-check_ntp.diff | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 web/attachments/177459-check_ntp.diff (limited to 'web/attachments/177459-check_ntp.diff') diff --git a/web/attachments/177459-check_ntp.diff b/web/attachments/177459-check_ntp.diff new file mode 100644 index 0000000..da11eb4 --- /dev/null +++ b/web/attachments/177459-check_ntp.diff @@ -0,0 +1,27 @@ +--- check_ntp 2006-04-28 07:19:01.546010471 +0200 ++++ check_ntp.modified 2006-04-28 07:02:45.236824995 +0200 +@@ -56,6 +56,10 @@ + # changed ntpdc to ntpq - jitter/dispersion is in milliseconds + # + # Patch for for regex for stratum1 refid. ++# ++# Script modified 2006 April 28 by Johan Nilsson (johan.nilsson@axis.com) ++# o Modified script to handle case when ntpdate reports time, but ntpq times out ++# + + require 5.004; + use POSIX; +@@ -427,8 +431,11 @@ + + foreach my $key (keys %ERRORS) { + if ($state==$ERRORS{$key}) { +-# print ("NTP $key: $answer"); +- print ("NTP $key: $answer|offset=$offset, jitter=" . $jitter/1000 . ",peer_stratum=$stratum\n"); ++ if ( defined($jitter) ) { ++ print ("NTP $key: $answer|offset=$offset, jitter=" . $jitter/1000 . ",peer_stratum=$stratum\n"); ++ } else { ++ print ("NTP $key: $answer"); ++ }; + last; + } + } -- cgit v1.2.3-74-g34f1