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/119417-check_ntp-diff | 68 +++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 web/attachments/119417-check_ntp-diff (limited to 'web/attachments/119417-check_ntp-diff') diff --git a/web/attachments/119417-check_ntp-diff b/web/attachments/119417-check_ntp-diff new file mode 100644 index 0000000..11d424d --- /dev/null +++ b/web/attachments/119417-check_ntp-diff @@ -0,0 +1,68 @@ +10,19c10 +< # $Id: check_ntp.pl,v 1.30 2005/02/09 11:15 mevertse Exp $ +< # +< # (c) 2005 Merijn Evertse, SARA Computing and Networking Services +< # 9-2-2005, 11:15 +< # +< # Modified the script to accept parameters -4, -6 to choose between the ipv4 and ipv6 protocol. +< # When no parameter is specified ipv4 is chosen as the default. +< # +< # (c) 2004 Matthew Kent +< # 19-11-2004, 04:00 +--- +> # $Id: check_ntp.pl,v 1.20 2004/11/19 03:59:43 mattkent Exp $ +73,74c64,65 +< use vars qw($opt_V $opt_h $opt_H $opt_t $opt_w $opt_c $opt_j $opt_k $verbose $PROGNAME $def_jitter $ipv4 $ipv6); +< use lib utils.pm; +--- +> use vars qw($opt_V $opt_h $opt_H $opt_t $opt_w $opt_c $opt_j $opt_k $verbose $PROGNAME $def_jitter); +> use lib utils.pm; +97,99c88 +< "v" => \$verbose, "verbose" => \$verbose, +< "4" => \$ipv4, "use-ipv4" => \$ipv4, +< "6" => \$ipv6, "use-ipv6" => \$ipv6, +--- +> "v" => \$verbose, "verbose" => \$verbose, +191,206d179 +< # Determine protocol te be used for ntpdate and ntpq +< my $ntpdate; +< my $ntpq; +< if ($ipv4) { +< $ntpdate = $utils::PATH_TO_NTPDATE . " -4"; +< $ntpq = $utils::PATH_TO_NTPQ . " -4"; +< } +< elsif ($ipv6) { +< $ntpdate = $utils::PATH_TO_NTPDATE . " -6"; +< $ntpq = $utils::PATH_TO_NTPQ . " -6"; +< } +< else { +< # Use IPv4 as the default value +< $ntpdate = $utils::PATH_TO_NTPDATE . " -4"; +< $ntpq = $utils::PATH_TO_NTPQ . " -4"; +< } +214c187 +< if (!open (NTPDATE, $ntpdate . " -q $host 2>&1 |")) { +--- +> if (!open (NTPDATE, "$utils::PATH_TO_NTPDATE -q $host 2>&1 |")) { +289c262 +< if ( open(NTPQ, $ntpq . " -np $host 2>&1 |") ) { +--- +> if ( open(NTPQ,"$utils::PATH_TO_NTPQ -np $host 2>&1 |") ) { +439c412 +< print "Usage: $PROGNAME -H [-46] [-w ] [-c ] [-j ] [-k ] [-v verbose]\n"; +--- +> print "Usage: $PROGNAME -H [-w ] [-c ] [-j ] [-k ] [-v verbose]\n"; +457c430 +< Clock jitter in milliseconds at which a warning message will be generated.\n Defaults to $DEFAULT_JITTER_CRIT. +--- +> Clock jitter in milliseconds at which a warning message will be generated.\n Defaults to $DEFAULT_JITTER_CRIT.\n +460,465c433,434 +< warning is returned.\n +< -4 (--use-ipv4) +< Use IPv4 connection +< -6 (--use-ipv6) +< Use IPv6 connection +< \n"; +--- +> warning is returned. +> "; -- cgit v1.2.3-74-g34f1