summaryrefslogtreecommitdiffstats
path: root/plugins/check_ntp.c
AgeCommit message (Collapse)AuthorFilesLines
2007-10-25check_ntp now return UNKNOWN instead of WARNING if jitter isThomas Guyot-Sionnest1-6/+25
unavailable. If no offset threshold is specified and the offset is unavailable, will return UNKNOWN as well. git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1811 f882894a-f735-0410-b71e-b25c423dba1c
2007-10-11Add stratum thresholds support for check_ntp (feature request #1703823)Thomas Guyot-Sionnest1-15/+56
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1806 f882894a-f735-0410-b71e-b25c423dba1c
2007-10-11Use provided threshold functions (no functionnal change apart the check for ↵Thomas Guyot-Sionnest1-38/+26
overlaping thresholds) git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1805 f882894a-f735-0410-b71e-b25c423dba1c
2007-09-26Patch #1798774: check_ntp: honor ntp flagsThomas Guyot-Sionnest1-0/+9
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1799 f882894a-f735-0410-b71e-b25c423dba1c
2007-07-14check_ntp: Fixed typo in typo in argument sanity check. Thanks to Aurelien ↵Matthias Eble1-1/+1
Bompard (#1753506) git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1756 f882894a-f735-0410-b71e-b25c423dba1c
2007-04-10- Fix possibility of printing scientific numbers in perfdataThomas Guyot-Sionnest1-12/+36
- Use fperfdata function for perfdata formatting - Make the printing part a bit more flexible (similar to check_disk) git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1678 f882894a-f735-0410-b71e-b25c423dba1c
2007-04-04Fix for getting dispersion instead of jitter on older servers (like xntpd on ↵Thomas Guyot-Sionnest1-2/+13
Solaris). git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1676 f882894a-f735-0410-b71e-b25c423dba1c
2007-04-03Fix the synchronization source selection on big-endian systems.Holger Weiss1-2/+2
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1675 f882894a-f735-0410-b71e-b25c423dba1c
2007-04-03Temporary fix for jitter calculationThomas Guyot-Sionnest1-1/+4
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1674 f882894a-f735-0410-b71e-b25c423dba1c
2007-04-02Don't rely on the assumption that the size of a READSTAT response is aHolger Weiss1-5/+6
multiple of sizeof(ntp_assoc_status_pair). git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1673 f882894a-f735-0410-b71e-b25c423dba1c
2007-04-02Fix byte order in verbose loggingThomas Guyot-Sionnest1-1/+1
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1671 f882894a-f735-0410-b71e-b25c423dba1c
2007-04-02Seems like we don't get any jitter sometimes. While this needs to be fixed ↵Thomas Guyot-Sionnest1-1/+2
we should at least handle it gracefully. git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1670 f882894a-f735-0410-b71e-b25c423dba1c
2007-03-31Fix an out-of-bounds memcpy(3) and add a realloc(3) error check inHolger Weiss1-2/+5
jitter_request(). git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1666 f882894a-f735-0410-b71e-b25c423dba1c
2007-03-31Add a warning to the verbose output if jitter_request() found noHolger Weiss1-1/+4
synchronization source. git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1665 f882894a-f735-0410-b71e-b25c423dba1c
2007-03-31Avoid division by zero.Holger Weiss1-1/+1
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1664 f882894a-f735-0410-b71e-b25c423dba1c
2007-03-31Remove the '-O' option, as it's ignored.Holger Weiss1-7/+2
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1663 f882894a-f735-0410-b71e-b25c423dba1c
2007-03-29Adding help text for jitter flagsTon Voon1-0/+4
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1651 f882894a-f735-0410-b71e-b25c423dba1c
2007-01-28Don't try to print `optarg' (which will be a NULL pointer) if an unknownHolger Weiss1-1/+1
command line option was used, as this leads to a segfault on some systems. The unknown option will be printed by getopt(3) anyway. So, simply call print_usage() and exit UNKNOWN via the new usage5() instead. git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1590 f882894a-f735-0410-b71e-b25c423dba1c
2007-01-20compilation fixes for check_ntp.c:M. Sean Finney1-3/+3
- check_ntp.c:290: warning: overflow in implicit constant conversion fixed with an explicit cast to int8_t. - check_ntp.c:544: warning: pointer of type ‘void *’ used in arithmetic fixed by casting to ptrdiff_t before arithmetic and (void*) afterwards - in TVtoNTP64, cast arithmetic result passed to R32 as uint64_t. git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1571 f882894a-f735-0410-b71e-b25c423dba1c
2006-10-19first pass at cleaning localization for new releaseBenoit Mortier1-18/+33
first pass at making all the headre be the same licence, plugin, etc... git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1499 f882894a-f735-0410-b71e-b25c423dba1c
2006-10-12Removed extraneous comma in perf data outputTon Voon1-1/+1
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1492 f882894a-f735-0410-b71e-b25c423dba1c
2006-08-11Catch no responses from any server (1538341 - nmdias)Ton Voon1-1/+6
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1467 f882894a-f735-0410-b71e-b25c423dba1c
2006-06-17cleaning up help and usageBenoit Mortier1-6/+12
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1433 f882894a-f735-0410-b71e-b25c423dba1c
2006-05-01- check_ntp:M. Sean Finney1-76/+144
- now roughly feature-complete. - various bugfixes, esp. offset calculation. - enhanced the asynchronous offset polling to set requests that haven't recieved a response in >= 1 second to stale and retransmit them, which results in much better performance on unreliable networks. - we only spend timeout/2 seconds polling offsets, and if we don't get everything by that point we work with what we have and set status to warning/critical depending on how much data we have. - set the same defaults as the perl script. - commit changes to configure.in to support automatic building of check_apt (if apt-get is installed and regex libraries available) and check_ntp (unconditionally), now defaulting to check_ntp.c instead of the perl script. if this is an issue we can back out the commit of course. an eye should be kept on check_ntp building and running correctly in different environments, esp. 64-bit and big-endian platforms, and those with more "esoteric" API's (do any of the platforms not have poll()?). - similar changes to Makefile.am's. - common.h: add statement to include sys/poll.h - runcmd.c: exit STATE_UNKNOWN if execve() fails. git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1386 f882894a-f735-0410-b71e-b25c423dba1c
2006-04-12the offset_requests are now parallelized. still stuff needs to beM. Sean Finney1-62/+105
done (conveniently marked with XXX), but on well behaving networks the plugin should behave more or less identical to check_ntp.pl now. git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1373 f882894a-f735-0410-b71e-b25c423dba1c
2006-04-12added a currently unused but "good for reference" version of offset_requestM. Sean Finney1-0/+76
which attempts to behave more like ntpdate, but this doesn't yet and the code isn't actually used yet. git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1372 f882894a-f735-0410-b71e-b25c423dba1c
2006-04-11another big code-commit to check_ntp. jitter calculations now work, andM. Sean Finney1-22/+247
the program is becoming much closer on the packet-for-packet level to how check_ntp.pl behaves. i'll send an email in the morning :) git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1371 f882894a-f735-0410-b71e-b25c423dba1c
2006-03-20- shuffling some code around to keep things tidy.M. Sean Finney1-19/+32
- now average the result of 4 queries just as ntpdate does - put things in place for jitter calculation git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1332 f882894a-f735-0410-b71e-b25c423dba1c
2006-03-20ipv6 support for c-version of check_ntpM. Sean Finney1-2/+12
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1331 f882894a-f735-0410-b71e-b25c423dba1c
2006-03-18initial version of the pure-c check_ntp implementation. jitter not yetM. Sean Finney1-0/+355
implemented, and a couple other misc things to do, so i haven't yet patched Makefile.am git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1330 f882894a-f735-0410-b71e-b25c423dba1c