[Nagiosplug-checkins] SF.net SVN: nagiosplug: [1845] nagiosplug/branches/dermoth_ntp_rework

dermoth at users.sourceforge.net dermoth at users.sourceforge.net
Tue Dec 4 13:33:00 CET 2007


Revision: 1845
          http://nagiosplug.svn.sourceforge.net/nagiosplug/?rev=1845&view=rev
Author:   dermoth
Date:     2007-12-04 04:33:00 -0800 (Tue, 04 Dec 2007)

Log Message:
-----------
Merge more changes from trunk

Modified Paths:
--------------
    nagiosplug/branches/dermoth_ntp_rework/NEWS
    nagiosplug/branches/dermoth_ntp_rework/plugins/check_cluster.c
    nagiosplug/branches/dermoth_ntp_rework/plugins/check_snmp.c

Modified: nagiosplug/branches/dermoth_ntp_rework/NEWS
===================================================================
--- nagiosplug/branches/dermoth_ntp_rework/NEWS	2007-12-04 12:28:50 UTC (rev 1844)
+++ nagiosplug/branches/dermoth_ntp_rework/NEWS	2007-12-04 12:33:00 UTC (rev 1845)
@@ -3,12 +3,13 @@
 1.4.11 or 1.5 ??
 	Fix check_http regression in 1.4.10 where following redirects to
 	  relative URLs on virtual hosts failed if both "-H" and "-I" were used
-	Add stratum thresholds support to check_ntp (feature request #1703823)
 	check_ntp now return UNKNOWN instead of WARNING if jitter is unavailable (jitter=-1.000000)
 	  as long as the thresholds range inculde -1. If no offset threshold is specified
 	  and the offset is unavailable, will return UNKNOWN as well.
 	  NOTE: If jitter thresholds are specified as integers it will return CRITICAL if jitter
 	  is "-1" as the default range starts at 0. See Examples in --help output.
+	Fix broken usage2 in check_snmp and check_cluster
+	check_cluster now accept all valid characters in its thresholds ("-", "@", "~")
 	Merge two new checks that deprecates check_ntp: check_ntp_peer and check_ntp_time.
 	  You should read the --help output so see which one is suitable for you. check_ntp_peer
 	  implement stratum thresholds support (feature request #1703823).

Modified: nagiosplug/branches/dermoth_ntp_rework/plugins/check_cluster.c
===================================================================
--- nagiosplug/branches/dermoth_ntp_rework/plugins/check_cluster.c	2007-12-04 12:28:50 UTC (rev 1844)
+++ nagiosplug/branches/dermoth_ntp_rework/plugins/check_cluster.c	2007-12-04 12:33:00 UTC (rev 1845)
@@ -178,14 +178,10 @@
 			break;
 
 		case 'w': /* warning threshold */
-			if (strspn (optarg, "0123456789:,") < strlen (optarg))
-				usage2 (_("Invalid warning threshold: %s\n"), optarg);
 			warn_threshold = strdup(optarg);
 			break;
 
 		case 'c': /* warning threshold */
-			if (strspn (optarg, "0123456789:,") < strlen (optarg))
-				usage2 (_("Invalid critical threshold: %s\n"), optarg);
 			crit_threshold = strdup(optarg);
 			break;
 

Modified: nagiosplug/branches/dermoth_ntp_rework/plugins/check_snmp.c
===================================================================
--- nagiosplug/branches/dermoth_ntp_rework/plugins/check_snmp.c	2007-12-04 12:28:50 UTC (rev 1844)
+++ nagiosplug/branches/dermoth_ntp_rework/plugins/check_snmp.c	2007-12-04 12:33:00 UTC (rev 1845)
@@ -521,7 +521,7 @@
 	/* Test parameters */
 		case 'c':									/* critical time threshold */
 			if (strspn (optarg, "0123456789:,") < strlen (optarg))
-				usage2 (_("Invalid critical threshold: %s\n"), optarg);
+				usage2 (_("Invalid critical threshold"), optarg);
 			for (ptr = optarg; ptr && jj < MAX_OIDS; jj++) {
 				if (llu_getll (&lower_crit_lim[jj], ptr) == 1)
 					eval_method[jj] |= CRIT_LT;
@@ -532,7 +532,7 @@
 			break;
 		case 'w':									/* warning time threshold */
 			if (strspn (optarg, "0123456789:,") < strlen (optarg))
-				usage2 (_("Invalid warning threshold: %s\n"), optarg);
+				usage2 (_("Invalid warning threshold"), optarg);
 			for (ptr = optarg; ptr && ii < MAX_OIDS; ii++) {
 				if (llu_getll (&lower_warn_lim[ii], ptr) == 1)
 					eval_method[ii] |= WARN_LT;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Commits mailing list