From 2acc26005c5395a96304e7a9e348b2e87f9e45c6 Mon Sep 17 00:00:00 2001 From: Thomas Guyot-Sionnest Date: Thu, 25 Oct 2007 21:06:08 +0000 Subject: check_ntp now return UNKNOWN instead of WARNING if jitter is 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 --- plugins/check_ntp.c | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) (limited to 'plugins') diff --git a/plugins/check_ntp.c b/plugins/check_ntp.c index 12334f77..df6e02f8 100644 --- a/plugins/check_ntp.c +++ b/plugins/check_ntp.c @@ -47,6 +47,7 @@ const char *email = "nagiosplug-devel@lists.sourceforge.net"; static char *server_address=NULL; static int verbose=0; +static short do_offset=0; static char *owarn="60"; static char *ocrit="120"; static short do_stratum=0; @@ -479,7 +480,7 @@ double offset_request(const char *host, int *stratum, int *status){ /* now, pick the best server from the list */ best_index=best_offset_server(servers, num_hosts); if(best_index < 0){ - *status=STATE_CRITICAL; + *status=STATE_UNKNOWN; } else { /* finally, calculate the average offset */ for(i=0; i