check_ntp

Paul L. Allen pla at softflare.com
Wed Jun 16 17:10:52 CEST 2004


Leif Nixon writes: 

> You are confusing me with somebody else.

Sorry. 

> I just jumped into the thread and pointed out that check_ntp is strange.

The check for an offset of 0 was probably intended to catch stratum 0,
and the five minutes or so after a restart while it's synching. 

> I'm talking about my systems, which check_ntp used to send alerts for
> even when they worked perfectly, just because offset happened to hit
> 0.000.

I suppose it can happen.  In which case it would probably be a good idea
to modify the if statement to 

 unless ($offset or $stratum < 10) 

assuming you fall back to stratum 10 when unsynched.  You might want to
do additional checking if you are really paranoid and think the offset
might be non-zero for any significant length of time when at stratum 0. 

I'd hesitate to recommend that change go into the CVS because some people
may not want to be alerted if NTP isn't synched.  After all, if you're
using the local clock against a drift file it should stay reasonably
accurate for a long time, and if it doesn't your offset check will catch
it.  OTOH, some people would want to know immediately if there is no
synch to external sources.  So perhaps a better fix would be to add
warning and critical checks for the stratum, with no stratum check
performed unless one or both of those were specified as options.  Then
if you want immediate notification about being loss of synch you could
add -s 1:9 -t 3 to flag a warning if you drop below stratum 3 and flag
critical if you drop below stratum 9. 

-- 
Paul Allen
Softflare Support 



-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
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