[Pkg-nagios-devel] Bug#318664: marked as done (nagios-plugins: check_ntp reports bogus errors.)

Debian Bug Tracking System owner at bugs.debian.org
Tue Oct 11 14:48:41 UTC 2005

Your message dated Tue, 11 Oct 2005 10:17:44 -0400
with message-id <20051011141744.GA19035 at seanius.net>
and subject line Bug#318664: [Pkg-nagios-devel] Bug#285554: acknowledged by developer (check_smtp update)
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

Received: (at submit) by bugs.debian.org; 16 Jul 2005 21:55:12 +0000
>From steveg at moregruel.net Sat Jul 16 14:55:12 2005
Return-path: <steveg at moregruel.net>
Received: from fury.moregruel.net [] 
	by spohr.debian.org with esmtp (Exim 3.36 1 (Debian))
	id 1Dtucp-0003Dl-00; Sat, 16 Jul 2005 14:55:11 -0700
Received: by fury.moregruel.net (Postfix, from userid 10)
	id CE6EE18B55; Sat, 16 Jul 2005 16:55:10 -0500 (CDT)
Received: by speedy.private (Postfix, from userid 1000)
	id 41D13140EA; Sat, 16 Jul 2005 16:54:32 -0500 (CDT)
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: Steve Greenland <steveg at moregruel.net>
To: Debian Bug Tracking System <submit at bugs.debian.org>
Subject: nagios-plugins: check_ntp reports bogus errors.
X-Mailer: reportbug 3.15
Date: Sat, 16 Jul 2005 16:54:32 -0500
Message-Id: <20050716215432.41D13140EA at speedy.private>
Delivered-To: submit at bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE 
	autolearn=no version=2.60-bugs.debian.org_2005_01_02

Package: nagios-plugins
Version: 1.4-6
Severity: normal

Check_ntp calls "ntpdate -q $host", which determines the offset of the
nagios host from $host. It then has this gem:

        $offset = $2;

        # An offset of 0.000000 with an error is probably bogus. Actually,
        # it's probably always bogus, but let's be paranoid here.
        if ($offset == 0) { undef $offset;}

        $ntpdate_error = defined ($offset) ? $ERRORS{"OK"} : $ERRORS{"CRITICAL"};

There's two problems: the first is that the comment doesn't match the
actual code; there's no check for an error, just the assumption that
"offset == 0.0" is an error.

The second problem is that if "$host" is "localhost" (i.e the host
running nagios), it's completely legitimate that the offset is 0 --
that's the whole *point* of ntp. As a practical matter, it tends to
flip between 0 and very small values, so nagios is continually swappign
between OK and CRITICAL.

For that matter, there's a third problem: the whole ntpdate check is
wrong headed. It compares the time on the nagios host to the time on the
host being monitored, which is irrelevant to the quality of time on the
remote host. The ntpq check is the proper one; the ntpdate check should
be removed entirely, which, since ntpdate is deprecated, would be just
as well.


-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (900, 'unstable'), (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.11-1-686
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages nagios-plugins depends on:
ii  dnsutils               1:9.3.1-2         Clients provided with BIND
ii  fping                  2.4b2-to-ipv6-11  sends ICMP ECHO_REQUEST packets to
ii  host                   20000331-9        utility for querying DNS servers
ii  iputils-ping           3:20020927-2      Tools to test the reachability of 
ii  libc6                  2.3.2.ds1-22      GNU C Library: Shared libraries an
ii  libldap2               2.1.30-11         OpenLDAP libraries
ii  libmysqlclient12       4.0.24-10         mysql database client library
ii  libnet-snmp-perl       5.0.1-1           Script SNMP connections
ii  libpq3                 1:7.4.8-13        PostgreSQL C client library
ii  libssl0.9.7            0.9.7g-1          SSL shared libraries
ii  ntp                    1:4.2.0a+stable-8 Network Time Protocol: network uti
ii  ntp-simple             1:4.2.0a+stable-8 Network Time Protocol: daemon for 
ii  ntpdate                1:4.2.0a+stable-8 The ntpdate client for setting sys
ii  procps                 1:3.2.5-1         /proc file system utilities
ii  qstat                  2.8-1             Command-line tool for querying qua
ii  radiusclient1          0.3.2-8           /bin/login replacement which uses 
ii  smbclient              3.0.14a-6         a LanManager-like simple client fo
ii  snmp                   5.1.2-6.1         NET SNMP (Simple Network Managemen

Versions of packages nagios-plugins recommends:
ii  nagios-text [nagios 2:1.3-cvs.20050402-4 A host/service/network monitoring 

-- no debconf information

Received: (at 318664-close) by bugs.debian.org; 11 Oct 2005 14:18:17 +0000
>From seanius at seanius.net Tue Oct 11 07:18:17 2005
Return-path: <seanius at seanius.net>
Received: from dsl092-235-113.phl1.dsl.speakeasy.net (sativa.seanius.net) [] 
	by spohr.debian.org with esmtp (Exim 3.36 1 (Debian))
	id 1EPKxN-0007Vo-00; Tue, 11 Oct 2005 07:18:17 -0700
Received: by sativa.seanius.net (Postfix, from userid 1000)
	id 0151815834; Tue, 11 Oct 2005 10:17:44 -0400 (EDT)
Date: Tue, 11 Oct 2005 10:17:44 -0400
From: sean finney <seanius at debian.org>
To: Steve Greenland <steveg at moregruel.net>,
	Jeroen van Wolffelaar <jeroen at wolffelaar.nl>,
	318664-close at bugs.debian.org, 268044-close at bugs.debian.org,
	318664-submitter at bugs.debian.org
Subject: Re: Bug#318664: [Pkg-nagios-devel] Bug#285554: acknowledged by developer (check_smtp update)
Message-ID: <20051011141744.GA19035 at seanius.net>
References: <20051009212753.GH10099 at A-Eskwadraat.nl> <20051010122854.GA600 at moregruel.net> <20051009140114.GA21043 at seanius.net> <20041214014158.GA16225 at wolffelaar.nl> <handler.285554.D285554.11288665068888.notifdone at bugs.debian.org> <20051009161518.GD10099 at A-Eskwadraat.nl> <20051009204037.GA24548 at seanius.net> <20051009212753.GH10099 at A-Eskwadraat.nl> <20051011080312.GA15019 at seanius.net> <20051011134127.GB5751 at moregruel.net>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="jI8keyz6grp/JLjh"
Content-Disposition: inline
In-Reply-To: <20051011134127.GB5751 at moregruel.net>
User-Agent: Mutt/
Delivered-To: 318664-close at bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
	autolearn=no version=2.60-bugs.debian.org_2005_01_02
X-CrossAssassin-Score: 2

Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

hi steve,

On Tue, Oct 11, 2005 at 08:41:27AM -0500, Steve Greenland wrote:
> > for the latter, is using ntpdate really a problem? jeroen: you claim
> > that ntpdate is deprecated, but is it? afaik it's still quite useful
> > in many situations, including this case.
> Regarding deprecation, see http://www.eecis.udel.edu/~mills/ntp/html/ntpd=
> where the first line reads:
>     "Disclaimer: The functionality of this program is now available
>     in the ntpd program. See the -q command line option in the ntpd -
>     Network Time Protocol (NTP) daemon page. After a suitable period
>     of mourning, the ntpdate program is to be retired from this
>     distribution."

yeah, in most cases ntpd is preferable because you don't get
"thunderclap" effects on ntp servers where everyone tries to sync
at once, and it's better in general to sync in little bits here
and there rather than lots at once, etc etc.  however, there
are some cases where ntpdate can be handy, such as for laptops
or machines that are frequently powered off.

> But as I wrote in the initial bug report, the whole concept of using
> offset from the Nagios server to determine the quality of time keeping
> on the remote server is misguided. What is interesting is whether or not
> the remote server is synced with its peer(s). Ntpq gives you that info.

> But, as they say on the kernel list, -ENOPATCH, so as far as I'm
> concerned, you can close this report.

unfortunately i don't know enough about ntpq (or ntp in general) to
implement this, so i'll follow the path of least resistance and
close the bug.  if anyone now or later objects we can ropen/retitle
the bug appropriately.



Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

Version: GnuPG v1.2.4 (GNU/Linux)



More information about the Pkg-nagios-devel mailing list