Re: [Nagios-devel] check_ntp, suggested changes

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

Re: [Nagios-devel] check_ntp, suggested changes

Post by Guest »

When would -p be more informative? It seems to me that -s would give us
the list of peers that that made it through the final stage of the clock
selection algorithm

Agree it would be useful to modify the regex to start with [+*] (and
autmatically filter out any at stratum 16)

The current CVS version allows for a warning/critical match against
column 8 (dispersion) rather than the fixed 15 below.

Will also add a -n option to prevent dns lookups and a -m option to warn
unless the ip addr specified by -m is the selected peer



(From http://www.eecis.udel.edu/~ntp/ntp_spoo ... ntpdc.html )


peers (-p)
The character in the left margin indicates the mode this peer entry is
operating in. A + denotes symmetric active, a - indicates symmetric
passive, a = means the remote server is being polled in client mode, a ^
indicates that the server is broadcasting to this address, a ~ denotes
that the remote peer is sending broadcasts and a * marks the peer the
server is currently synchonizing to.

The contents of the host field may be one of four forms. It may be a
host name, an IP address, a reference clock implementation name with its
parameter or REFCLK(implementation number, parameter). On hostnames no
only IP-addresses will be displayed.

dmpeers (-s)
A slightly different peer summary list. Identical to the output of the
peers command, except for the character in the leftmost column. Characters
only appear beside peers which were included in the final stage of the
clock selection algorithm. A . indicates that this peer was cast off in
the falseticker detection, while a + indicates that the peer made it
through. A * denotes the peer the server is currently synchronizing with.



-sg

On Wed, 16 Oct 2002 kemp@network-services.uoregon.edu wrote:

>
> On the xntpdc stuff, seems like "-p" is more informative
> rather than "-s". There are cases where "-p" will give you
> the "+" and "=" designations for peers/clients where "-s" will
> give you nothing. Which leads to my real concern.
>
> When you are doing check_ntp against your ntpd, you really
> don't care if your *clients* are out of sync, rather you only
> care if your *peers* or your preferred server is out. So...
> to get that, you use "-p" and you look for lines that start with
> '+', or '=', or '*'.
>
> Simple changes, but it makes more sense to me... Yes???
> Something like:
>
> if ( open(NTPDC,"$utils::PATH_TO_NTPDC -p $host 2>&1 |") ) {
> while () {
> print $_ if ($verbose);
> if (/([+=*])([^\s]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)
> \s+([-0-9.]+)\s+([-0-9.]+)/) {
> if ($8>15) {
>
> This will fix some of the problems that people have reported having
> to do with "dispersion too high".
>
> John G. Kemp ~ e-mail: kemp@ns.uoregon.edu
> Sr. Security Engineer ~ incidents: security@uoregon.edu
> UO Computing Center ~ phone: (541) 346-1704
> 1225 Kincaid Street ~ fax: (541) 346-4397
> Eugene, OR 97403 ~ http://security.uoregon.edu/
>

--








This post was automatically imported from historical nagios-devel mailing list archives
Original poster: sghosh@sghosh.org
Locked