summaryrefslogtreecommitdiffstats
path: root/web/attachments/177459-check_ntp.diff
diff options
context:
space:
mode:
authorHolger Weiss <holger@zedat.fu-berlin.de>2013-09-29 22:03:24 (GMT)
committerHolger Weiss <holger@zedat.fu-berlin.de>2013-09-29 22:03:24 (GMT)
commit0b6423f9c99d9edf8c96fefd0f6c453859395aa1 (patch)
tree1c2b6b21704a294940f87c7892676998d8371707 /web/attachments/177459-check_ntp.diff
downloadsite-0b6423f9c99d9edf8c96fefd0f6c453859395aa1.tar.gz
Import Nagios Plugins site
Import the Nagios Plugins web site, Cronjobs, infrastructure scripts, and configuration files.
Diffstat (limited to 'web/attachments/177459-check_ntp.diff')
-rw-r--r--web/attachments/177459-check_ntp.diff27
1 files changed, 27 insertions, 0 deletions
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 @@
1--- check_ntp 2006-04-28 07:19:01.546010471 +0200
2+++ check_ntp.modified 2006-04-28 07:02:45.236824995 +0200
3@@ -56,6 +56,10 @@
4 # changed ntpdc to ntpq - jitter/dispersion is in milliseconds
5 #
6 # Patch for for regex for stratum1 refid.
7+#
8+# Script modified 2006 April 28 by Johan Nilsson (johan.nilsson@axis.com)
9+# o Modified script to handle case when ntpdate reports time, but ntpq times out
10+#
11
12 require 5.004;
13 use POSIX;
14@@ -427,8 +431,11 @@
15
16 foreach my $key (keys %ERRORS) {
17 if ($state==$ERRORS{$key}) {
18-# print ("NTP $key: $answer");
19- print ("NTP $key: $answer|offset=$offset, jitter=" . $jitter/1000 . ",peer_stratum=$stratum\n");
20+ if ( defined($jitter) ) {
21+ print ("NTP $key: $answer|offset=$offset, jitter=" . $jitter/1000 . ",peer_stratum=$stratum\n");
22+ } else {
23+ print ("NTP $key: $answer");
24+ };
25 last;
26 }
27 }