check_ntp_peer reports stratum off-by-one?

Marc Haber mh+nagios-users at zugschlus.de
Sat Jul 14 21:02:32 CEST 2012


On Tue, Jan 03, 2012 at 10:26:52AM +0000, Paul WILLIS PSE 55499 wrote:
> I apologise for lecturing you, I thought you were confused over that aspect. But certainly it is reporting the
> stratum of its peer. With -v on one of our servers I get for example in part 
> parsing stratum from peer bf36: 2
> and bf36 hex is 48950 which is the associationID of our timesource which is stratum 2. 
> We only have a single timesource so I'm not sure how it deals with multiple host strata. My guess
> would be it just takes that of the asterisked timesource.

I'm having the same issue and got confused as well:

$ ntpq -c pe torres.zugschlus.de
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*ptbtime1.ptb.de .PTB.            1 u 1044 1024  377   18.521   -1.513   0.258
+ptbtime2.ptb.de .PTB.            1 u  903 1024  377   18.132   -1.277   0.373
-node01.mserverz 85.10.240.253    3 u  651 1024  377   18.721   -7.067   6.829
 zefiris.semidef 192.53.103.108   2 u  490 1024  377   16.496    4.906   0.680
-evie.fra1.as411 78.47.148.174    3 u  974 1024  377   18.879    4.630   0.616
+geiger-online.c 81.94.123.17     2 u  556 1024  377   18.200    4.669   0.694
$  /usr/lib/nagios/plugins/check_ntp_peer -H torres.zugschlus.de --warning=3 --critical=5 --jwarn=1 --jcrit=2 --twarn=5 --tcrit=5 --swarn=2 --scrit=2
NTP OK: Offset -0,001 secs, jitter=0,000000, stratum=1, truechimers=5|offset=-0,001000s;3,000000;5,000000; jitter=0,000000;1,000000;2,000000;0,000000 stratum=1;2;2;0;16 truechimers=5;5;5;0
$

Does this mean that the --swarn und --twarn options actually check the
stratum of the "best" peer of the queried server, not the queried
server itself?

And, while we're at it, why is this:

$  /usr/lib/nagios/plugins/check_ntp_peer -H torres.zugschlus.de --twarn=5 --tcrit=4 -v
3 candidate peers available
synchronization source found
Getting offset, jitter and stratum for peer 20cf
parsing offset from peer 20cf: -0,001
NTP CRITICAL: Offset -0,001 secs, truechimers=5|offset=-0,001000s;60,000000;120,000000; truechimers=5;5;4;0
$

critical? 5 truechimers are better than four, why does check_ntp_peer
not like that? When I raise --tcrit=5, the status goes to OK. Is the
check the wrong way around?

Greetings
Marc

-- 
-----------------------------------------------------------------------------
Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
Mannheim, Germany  |  lose things."    Winona Ryder | Fon: *49 621 31958061
Nordisch by Nature |  How to make an American Quilt | Fax: *49 621 31958062

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list