[Nagiosplug-devel] check_ntp patch for unknown offset/jitter

Thomas Guyot-Sionnest Thomas at zango.com
Thu Oct 25 23:14:23 CEST 2007


Just one note about my latest commit... Normally check_ntp should return
UNKNOWN if offset is unknown and there are no offset thresholds
specified. However (on a freshly started ntp daemon):

# ./check_ntp -H localhost; echo $?
NTP OK: Offset unknown|
0

This is because the max_state function put STATE_OK above STATE_UNKNOWN.
I believe we should either change that of have a 2nd max_state function
to get the desired result.

I didn't felt like working around this in check_ntp code so if we could
agree on the way to go I can code that (for both C and Perl) and fix
this issue.

If we go for two different functions, any suggestion for the name
(otherwise I'll just go with max_state_alt)?

Thanks

Thomas




More information about the Devel mailing list