[Nagiosplug-help] check_ntp_peer stratum issue

Thomas Guyot-Sionnest dermoth at aei.ca
Thu Jun 25 14:10:32 CEST 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 24/06/09 10:17 AM, Nottorf, Stefan wrote:
> -----Ursprüngliche Nachricht-----
> Von: Dánial Olsen [mailto:DOL at ft.fo] 
> Gesendet: Mittwoch, 24. Juni 2009 12:50
> An: nagiosplug-help at lists.sourceforge.net
> Betreff: [Nagiosplug-help] check_ntp_peer stratum issue
> 
> Hi,
> 
> The check_ntp_peer plugin reports servers to be one stratum lower then they actually are.
> I sync against stratum 1 ntp, which check_ntp_peer insists is stratum 0.
> 
> Running FreeBSD 6.4, nagios 3.0.6 and nagios-plugins 1.4.13
> 
> Here is output from the plugin:
> # /usr/local/libexec/nagios/check_ntp_peer -H 10.10.10.2 -W 4
> NTP OK: Offset 3.7e-05 secs, stratum=0|offset=0.000037s;60.000000;120.000000; stratum=0;4;16;0;16
> 
> And output from local ntpd:
> # ntpq -p
> remote        refid  st t when poll reach  delay  offset  jitter
> ================================================================
> *10.10.10.2   .GPS.  1 u  124  128  377    2.270  23.110  5.462
> 
> 
> I've also tried running the plugin against other ntp's with higher stratum, but it always reports one level lower.
> Does anybody have an explanation?
> 
> --
> Danial
> 
> I had a similar question some months ago and posted it in a nagios community portal and also in the ntp mailing list.
> Quick answer is: This is an issue with Nagios
> Workaround: write a wrapper for this check and add 1 to the stratum.
> 
> The more detailed answers are at https://lists.ntp.org/pipermail/questions/2008-September/019718.html
> and, if you are willing to read german, http://www.nagios-portal.org/wbb/index.php?page=Thread&postID=84566&highlight=#post84566

Actually it returns the stratum of the sync peer of the server... To
properly fix this we would need yet another query to get the peer's
stratum instead of the sync peer's stratum.

I'm no sure if we should change the code or the documentation... right
now it means "the ntp server is getting time source from a server of
stratum N".

- --
Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFKQ2k46dZ+Kt5BchYRAj9jAJ970iGEyzj9x1iauj2Bdb7NY5LxKQCeNLjo
HnXcK4fKyjjVS+8JhgKfhrg=
=1c0C
-----END PGP SIGNATURE-----




More information about the Help mailing list