summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Guyot-Sionnest <dermoth@users.sourceforge.net>2007-12-04 12:33:00 (GMT)
committerThomas Guyot-Sionnest <dermoth@users.sourceforge.net>2007-12-04 12:33:00 (GMT)
commitb5f11055dcef13a5c0b67207a291e1916036ca1f (patch)
tree97822eed51e47a88201251c61d73afe1bc7ce0be
parentc1418c9dafba384536595bea2f5f4d256a498d15 (diff)
downloadmonitoring-plugins-tg/ntp_rework.tar.gz
Merge more changes from trunktg/ntp_rework
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/branches/dermoth_ntp_rework@1845 f882894a-f735-0410-b71e-b25c423dba1c
-rw-r--r--NEWS3
-rw-r--r--plugins/check_cluster.c4
-rw-r--r--plugins/check_snmp.c4
3 files changed, 4 insertions, 7 deletions
diff --git a/NEWS b/NEWS
index 6200944..f2de153 100644
--- a/NEWS
+++ b/NEWS
@@ -3,12 +3,13 @@ This file documents the major additions and syntax changes between releases.
31.4.11 or 1.5 ?? 31.4.11 or 1.5 ??
4 Fix check_http regression in 1.4.10 where following redirects to 4 Fix check_http regression in 1.4.10 where following redirects to
5 relative URLs on virtual hosts failed if both "-H" and "-I" were used 5 relative URLs on virtual hosts failed if both "-H" and "-I" were used
6 Add stratum thresholds support to check_ntp (feature request #1703823)
7 check_ntp now return UNKNOWN instead of WARNING if jitter is unavailable (jitter=-1.000000) 6 check_ntp now return UNKNOWN instead of WARNING if jitter is unavailable (jitter=-1.000000)
8 as long as the thresholds range inculde -1. If no offset threshold is specified 7 as long as the thresholds range inculde -1. If no offset threshold is specified
9 and the offset is unavailable, will return UNKNOWN as well. 8 and the offset is unavailable, will return UNKNOWN as well.
10 NOTE: If jitter thresholds are specified as integers it will return CRITICAL if jitter 9 NOTE: If jitter thresholds are specified as integers it will return CRITICAL if jitter
11 is "-1" as the default range starts at 0. See Examples in --help output. 10 is "-1" as the default range starts at 0. See Examples in --help output.
11 Fix broken usage2 in check_snmp and check_cluster
12 check_cluster now accept all valid characters in its thresholds ("-", "@", "~")
12 Merge two new checks that deprecates check_ntp: check_ntp_peer and check_ntp_time. 13 Merge two new checks that deprecates check_ntp: check_ntp_peer and check_ntp_time.
13 You should read the --help output so see which one is suitable for you. check_ntp_peer 14 You should read the --help output so see which one is suitable for you. check_ntp_peer
14 implement stratum thresholds support (feature request #1703823). 15 implement stratum thresholds support (feature request #1703823).
diff --git a/plugins/check_cluster.c b/plugins/check_cluster.c
index 703fff9..f1568d5 100644
--- a/plugins/check_cluster.c
+++ b/plugins/check_cluster.c
@@ -178,14 +178,10 @@ int process_arguments(int argc, char **argv){
178 break; 178 break;
179 179
180 case 'w': /* warning threshold */ 180 case 'w': /* warning threshold */
181 if (strspn (optarg, "0123456789:,") < strlen (optarg))
182 usage2 (_("Invalid warning threshold: %s\n"), optarg);
183 warn_threshold = strdup(optarg); 181 warn_threshold = strdup(optarg);
184 break; 182 break;
185 183
186 case 'c': /* warning threshold */ 184 case 'c': /* warning threshold */
187 if (strspn (optarg, "0123456789:,") < strlen (optarg))
188 usage2 (_("Invalid critical threshold: %s\n"), optarg);
189 crit_threshold = strdup(optarg); 185 crit_threshold = strdup(optarg);
190 break; 186 break;
191 187
diff --git a/plugins/check_snmp.c b/plugins/check_snmp.c
index 9fa4a60..c69e97a 100644
--- a/plugins/check_snmp.c
+++ b/plugins/check_snmp.c
@@ -521,7 +521,7 @@ process_arguments (int argc, char **argv)
521 /* Test parameters */ 521 /* Test parameters */
522 case 'c': /* critical time threshold */ 522 case 'c': /* critical time threshold */
523 if (strspn (optarg, "0123456789:,") < strlen (optarg)) 523 if (strspn (optarg, "0123456789:,") < strlen (optarg))
524 usage2 (_("Invalid critical threshold: %s\n"), optarg); 524 usage2 (_("Invalid critical threshold"), optarg);
525 for (ptr = optarg; ptr && jj < MAX_OIDS; jj++) { 525 for (ptr = optarg; ptr && jj < MAX_OIDS; jj++) {
526 if (llu_getll (&lower_crit_lim[jj], ptr) == 1) 526 if (llu_getll (&lower_crit_lim[jj], ptr) == 1)
527 eval_method[jj] |= CRIT_LT; 527 eval_method[jj] |= CRIT_LT;
@@ -532,7 +532,7 @@ process_arguments (int argc, char **argv)
532 break; 532 break;
533 case 'w': /* warning time threshold */ 533 case 'w': /* warning time threshold */
534 if (strspn (optarg, "0123456789:,") < strlen (optarg)) 534 if (strspn (optarg, "0123456789:,") < strlen (optarg))
535 usage2 (_("Invalid warning threshold: %s\n"), optarg); 535 usage2 (_("Invalid warning threshold"), optarg);
536 for (ptr = optarg; ptr && ii < MAX_OIDS; ii++) { 536 for (ptr = optarg; ptr && ii < MAX_OIDS; ii++) {
537 if (llu_getll (&lower_warn_lim[ii], ptr) == 1) 537 if (llu_getll (&lower_warn_lim[ii], ptr) == 1)
538 eval_method[ii] |= WARN_LT; 538 eval_method[ii] |= WARN_LT;