Modified: trunk/Makefile
===================================================================
--- trunk/Makefile 2012-07-31 12:27:45 UTC (rev 26)
+++ trunk/Makefile 2012-07-31 13:58:33 UTC (rev 27)
@@ -26,7 +26,8 @@
RELEASE = 1
NAGIOS = nagios-3.2.3
-NAGIOSPLUG = nagios-plugins-1.4.15
+# using git checkout 2012-07-18: 3c10d84ea21c91c4f14cb241f5c7f24e4536476a
+NAGIOSPLUG = nagios-plugins-1.4.17-dev
NAGIOSPLUG_CONFIGURE_PERL_MODULES = --enable-perl-modules
CHECK_RADIUS_IH = check_radius_ih-1.1
NRPE = nrpe-2.12
@@ -544,15 +545,10 @@
gunzip -c ${NAGIOSPLUG}.tar.gz | tar -xf -
cd ${NAGIOSPLUG} && patch -p1 < ../patches/nagiosplug_check_smart_help.patch
#cd ${NAGIOSPLUG} && patch -p1 < ../patches/nagiosplug_check_swap_solaris_fix.patch
- # Below fixed in 1.4.16
- cd ${NAGIOSPLUG} && patch plugins/check_snmp.c < ../patches/nagiosplug_check_snmp_remove_is_numeric.patch
cp patches/nagiosplug_check_disk_smb.pl ${NAGIOSPLUG}/plugins-scripts/check_disk_smb.pl
- # Below fixed in 1.4.16
- cd ${NAGIOSPLUG} && patch -p1 < ../patches/nagiosplug_check_procs_fix_pipe_symbol.patch
- # waiting on commit upstream - SF.net tracker ID 3358348
- cd ${NAGIOSPLUG} && patch -p1 < ../patches/nagiosplug_catch_check_smtp_sigpipe.patch
- # Below fixed in 1.4.16
- cd ${NAGIOSPLUG} && patch -p1 < ../patches/nagiosplug_redundant_ssl_certificate_messages.patch
+ # Below fixed in 1.4.16 - but would will continue checking, see:
+ # http://nagiosplug.git.sourceforge.net/git/gitweb.cgi?p=nagiosplug/nagiosplug;a=commit;h=cbc8a7f313c3e093165e544b4507539932c7f3e1
+ # cd ${NAGIOSPLUG} && patch -p1 < ../patches/nagiosplug_redundant_ssl_certificate_messages.patch
# nagios-plugins tracker rt#3414894 for check_http patch
cd ${NAGIOSPLUG} && patch -p1 < ../patches/nagiosplug_check_http_connect_method.patch
#cd ${NAGIOSPLUG} && patch -p1 < ../patches/nagiosplug_lmstat_path.patch
@@ -564,6 +560,9 @@
# but this is okay
cd ${NAGIOSPLUG} && patch -p1 < ../patches/nagios_plugins_params_validate_noxs.patch
cd ${NAGIOSPLUG} && patch -p1 < ../patches/nagiosplug_check_snmp_override_perfstat_units.patch
+ # checkout from git repository, see:
+ # http://nagiosplug.sourceforge.net/developer-guidelines.html#DEVREQUIREMENTS
+ cd ${NAGIOSPLUG} && ./tools/setup
if [ `uname -s` = Linux ] ; then \
cd ${NAGIOSPLUG} && PATH="/usr/bin:/usr/sbin:$$PATH" CFLAGS="${CFLAGS}" ./configure --with-mysql --with-nagios-user=$(NAGIOS_USER) --with-nagios-group=$(NAGIOS_GROUP) ${NAGIOSPLUG_CONFIGURE_PERL_MODULES} --localstatedir=/usr/local/nagios/var/plugins && make ; \
elif [ `uname -s` = Darwin ] ; then \
Deleted: trunk/nagios-plugins-1.4.15.tar.gz
===================================================================
(Binary files differ)
Added: trunk/nagios-plugins-1.4.17-dev.tar.gz
===================================================================
(Binary files differ)
Property changes on: trunk/nagios-plugins-1.4.17-dev.tar.gz
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Deleted: trunk/patches/nagiosplug_catch_check_smtp_sigpipe.patch
===================================================================
--- trunk/patches/nagiosplug_catch_check_smtp_sigpipe.patch 2012-07-31 12:27:45 UTC (rev 26)
+++ trunk/patches/nagiosplug_catch_check_smtp_sigpipe.patch 2012-07-31 13:58:33 UTC (rev 27)
@@ -1,90 +0,0 @@
-diff -ru nagios-plugins-1.4.15.orig/plugins/check_smtp.c nagios-plugins-1.4.15/plugins/check_smtp.c
---- nagios-plugins-1.4.15.orig/plugins/check_smtp.c 2010-07-27 20:47:16.000000000 +0000
-+++ nagios-plugins-1.4.15/plugins/check_smtp.c 2011-07-15 10:51:11.000000000 +0000
-@@ -114,6 +114,7 @@
- TCP_PROTOCOL = 1,
- UDP_PROTOCOL = 2,
- };
-+int ignore_send_quit_failure = FALSE;
-
-
- int
-@@ -129,6 +130,9 @@
- char *error_msg = "";
- struct timeval tv;
-
-+ /* catch pipe errors in read.write */
-+ (void) signal (SIGPIPE, SIG_IGN);
-+
- setlocale (LC_ALL, "");
- bindtextdomain (PACKAGE, LOCALEDIR);
- textdomain (PACKAGE);
-@@ -476,6 +480,7 @@
- {"help", no_argument, 0, 'h'},
- {"starttls",no_argument,0,'S'},
- {"certificate",required_argument,0,'D'},
-+ {"ignore-quit-failure",no_argument,0,'q'},
- {0, 0, 0, 0}
- };
-
-@@ -492,7 +497,7 @@
- }
-
- while (1) {
-- c = getopt_long (argc, argv, "+hVv46t:p:f:e:c:w:H:C:R:SD:F:A:U:P:",
-+ c = getopt_long (argc, argv, "+hVv46t:p:f:e:c:w:H:C:R:SD:F:A:U:P:q",
- longopts, &option);
-
- if (c == -1 || c == EOF)
-@@ -579,6 +584,9 @@
- case 'v': /* verbose */
- verbose++;
- break;
-+ case 'q':
-+ ignore_send_quit_failure++; /* ignore problem sending QUIT */
-+ break;
- case 't': /* timeout */
- if (is_intnonneg (optarg)) {
- socket_timeout = atoi (optarg);
-@@ -662,8 +670,21 @@
- smtp_quit(void)
- {
- int bytes;
-+ int n;
-+
-+ n = my_send(SMTP_QUIT, strlen(SMTP_QUIT));
-+ if(n < 0) {
-+ if(ignore_send_quit_failure) {
-+ if(verbose) {
-+ printf(
-+ _("Connection closed by server before sending QUIT command\n"));
-+ }
-+ return;
-+ }
-+ die (STATE_UNKNOWN,
-+ _("Connection closed by server before sending QUIT command\n"));
-+ }
-
-- my_send(SMTP_QUIT, strlen(SMTP_QUIT));
- if (verbose)
- printf(_("sent %s\n"), "QUIT");
-
-@@ -797,7 +818,9 @@
- printf (" %s\n", _("SMTP AUTH username"));
- printf (" %s\n", "-P, --authpass=STRING");
- printf (" %s\n", _("SMTP AUTH password"));
--
-+ printf (" %s\n", "-q, --ignore-quit-failure");
-+ printf (" %s\n", _("Ignore failure when sending QUIT command to server"));
-+
- printf (UT_WARN_CRIT);
-
- printf (UT_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
-@@ -821,6 +844,6 @@
- printf ("%s\n", _("Usage:"));
- printf ("%s -H host [-p port] [-e expect] [-C command] [-f from addr]", progname);
- printf ("[-A authtype -U authuser -P authpass] [-w warn] [-c crit] [-t timeout]\n");
-- printf ("[-F fqdn] [-S] [-D days] [-v] [-4|-6]\n");
-+ printf ("[-F fqdn] [-S] [-D days] [-v] [-4|-6] [-q]\n");
- }
-
Modified: trunk/patches/nagiosplug_check_http_connect_method.patch
===================================================================
--- trunk/patches/nagiosplug_check_http_connect_method.patch 2012-07-31 12:27:45 UTC (rev 26)
+++ trunk/patches/nagiosplug_check_http_connect_method.patch 2012-07-31 13:58:33 UTC (rev 27)
@@ -1,7 +1,8 @@
-diff -ur nagios-plugins-1.4.15.orig/plugins/check_http.c nagios-plugins-1.4.15/plugins/check_http.c
---- nagios-plugins-1.4.15.orig/plugins/check_http.c 2010-07-27 20:47:16.000000000 +0000
-+++ nagios-plugins-1.4.15/plugins/check_http.c 2011-09-09 14:03:49.000000000 +0000
-@@ -805,9 +805,34 @@
+diff --git a/plugins/check_http.c b/plugins/check_http.c
+index 5c8a80c..02f89c6 100644
+--- a/plugins/check_http.c
++++ b/plugins/check_http.c
+@@ -818,11 +818,35 @@ check_http (void)
/* try to connect to the host at the given port number */
if (my_tcp_connect (server_address, server_port, &sd) != STATE_OK)
die (STATE_CRITICAL, _("HTTP CRITICAL - Unable to open TCP socket\n"));
@@ -9,16 +10,15 @@
+ /* if we are called with the -I option, the -j method is CONNECT and */
+ /* we received -S for SSL, then we tunnel the request through a proxy*/
+ /* @20100414, public[at]frank4dd.com, http://www.frank4dd.com/howto */
-+
+ if ( server_address != NULL && strcmp(http_method, "CONNECT") == 0
+ && host_name != NULL && use_ssl == TRUE) {
+
+ if (verbose) printf ("Entering CONNECT tunnel mode with proxy %s:%d to dst %s:%d\n", server_address, server_port, host_name, HTTPS_PORT);
-+ asprintf (&buf, "%s %s:%d HTTP/1.1\r\n%s\r\n", http_method, host_name, HTTPS_PORT, user_agent);
-+ asprintf (&buf, "%sProxy-Connection: keep-alive\r\n", buf);
-+ asprintf (&buf, "%sHost: %s\r\n", buf, host_name);
++ xasprintf (&buf, "%s %s:%d HTTP/1.1\r\n%s\r\n", http_method, host_name, HTTPS_PORT, user_agent);
++ xasprintf (&buf, "%sProxy-Connection: keep-alive\r\n", buf);
++ xasprintf (&buf, "%sHost: %s\r\n", buf, host_name);
+ /* we finished our request, send empty line with CRLF */
-+ asprintf (&buf, "%s%s", buf, CRLF);
++ xasprintf (&buf, "%s%s", buf, CRLF);
+ if (verbose) printf ("%s\n", buf);
+ send(sd, buf, strlen (buf), 0);
+ buf[0]='\0';
@@ -28,28 +28,31 @@
+ if (verbose) printf ("%s", buffer);
+ /* Here we should check if we got HTTP/1.1 200 Connection established */
+ }
-+
++
#ifdef HAVE_SSL
if (use_ssl == TRUE) {
- np_net_ssl_init_with_hostname(sd, (use_sni ? host_name : NULL));
+ result = np_net_ssl_init_with_hostname_and_version(sd, (use_sni ? host_name : NULL), ssl_version);
+ if (result != STATE_OK)
+ return result;
+ if (verbose) printf ("SSL initialized\n");
if (check_cert == TRUE) {
- result = np_net_ssl_check_cert(days_till_exp);
+ result = np_net_ssl_check_cert(days_till_exp_warn, days_till_exp_crit);
np_net_ssl_cleanup();
-@@ -817,7 +842,11 @@
+@@ -832,7 +856,12 @@ check_http (void)
}
#endif /* HAVE_SSL */
-- asprintf (&buf, "%s %s %s\r\n%s\r\n", http_method, server_url, host_name ? "HTTP/1.1" : "HTTP/1.0", user_agent);
+- xasprintf (&buf, "%s %s %s\r\n%s\r\n", http_method, server_url, host_name ? "HTTP/1.1" : "HTTP/1.0", user_agent);
+ if ( server_address != NULL && strcmp(http_method, "CONNECT") == 0
+ && host_name != NULL && use_ssl == TRUE)
-+ asprintf (&buf, "%s %s %s\r\n%s\r\n", "GET", server_url, host_name ? "HTTP/1.1" : "HTTP/1.0", user_agent);
++ xasprintf (&buf, "%s %s %s\r\n%s\r\n", "GET", server_url, host_name ? "HTTP/1.1" : "HTTP/1.0", user_agent);
+ else
-+ asprintf (&buf, "%s %s %s\r\n%s\r\n", http_method, server_url, host_name ? "HTTP/1.1" : "HTTP/1.0", user_agent);
++ xasprintf (&buf, "%s %s %s\r\n%s\r\n", http_method, server_url, host_name ? "HTTP/1.1" : "HTTP/1.0", user_agent);
++
/* tell HTTP/1.1 servers not to keep the connection alive */
- asprintf (&buf, "%sConnection: close\r\n", buf);
-@@ -830,7 +859,9 @@
+ xasprintf (&buf, "%sConnection: close\r\n", buf);
+@@ -845,7 +874,9 @@ check_http (void)
* (default) port is explicitly specified in the "Host:" header line.
*/
if ((use_ssl == FALSE && server_port == HTTP_PORT) ||
@@ -57,10 +60,10 @@
+ (use_ssl == TRUE && server_port == HTTPS_PORT) ||
+ ( server_address != NULL && strcmp(http_method, "CONNECT") == 0
+ && host_name != NULL && use_ssl == TRUE))
- asprintf (&buf, "%sHost: %s\r\n", buf, host_name);
+ xasprintf (&buf, "%sHost: %s\r\n", buf, host_name);
else
- asprintf (&buf, "%sHost: %s:%d\r\n", buf, host_name, server_port);
-@@ -1355,7 +1386,7 @@
+ xasprintf (&buf, "%sHost: %s:%d\r\n", buf, host_name, server_port);
+@@ -1368,7 +1399,7 @@ print_help (void)
printf (" %s\n", _("URL to GET or POST (default: /)"));
printf (" %s\n", "-P, --post=STRING");
printf (" %s\n", _("URL encoded http POST data"));
@@ -69,12 +72,12 @@
printf (" %s\n", _("Set HTTP method."));
printf (" %s\n", "-N, --no-body");
printf (" %s\n", _("Don't wait for document body: stop reading after headers."));
-@@ -1423,7 +1454,15 @@
- printf (" %s\n", _("When the certificate of 'www.verisign.com' is valid for more than 14 days,"));
+@@ -1446,7 +1477,14 @@ print_help (void)
+ printf (" %s\n", _("When the certificate of 'www.verisign.com' is valid for more than 30 days,"));
printf (" %s\n", _("a STATE_OK is returned. When the certificate is still valid, but for less than"));
- printf (" %s\n", _("14 days, a STATE_WARNING is returned. A STATE_CRITICAL will be returned when"));
-- printf (" %s\n", _("the certificate is expired."));
-+ printf (" %s\n\n", _("the certificate is expired."));
+ printf (" %s\n", _("30 days, but more than 14 days, a STATE_WARNING is returned."));
+- printf (" %s\n", _("A STATE_CRITICAL will be returned when certificate expires in less than 14 days"));
++ printf (" %s\n\n", _("A STATE_CRITICAL will be returned when certificate expires in less than 14 days"));
+
+ printf (" %s\n\n", "CHECK SSL WEBSERVER CONTENT VIA PROXY USING HTTP 1.1 CONNECT: ");
+ printf (" %s\n\n", _("check_http -I 192.168.100.35 -p 80 -u https://www.verisign.com/ -S -j CONNECT -H www.verisign.com "));
@@ -82,7 +85,6 @@
+ printf (" %s\n", _("A STATE_OK will be returned. When the server returns its content but exceeds"));
+ printf (" %s\n", _("the 5-second threshold, a STATE_WARNING will be returned. When an error occurs,"));
+ printf (" %s\n", _("a STATE_CRITICAL will be returned."));
-+
+
#endif
- printf (UT_SUPPORT);
Deleted: trunk/patches/nagiosplug_check_procs_fix_pipe_symbol.patch
===================================================================
--- trunk/patches/nagiosplug_check_procs_fix_pipe_symbol.patch 2012-07-31 12:27:45 UTC (rev 26)
+++ trunk/patches/nagiosplug_check_procs_fix_pipe_symbol.patch 2012-07-31 13:58:33 UTC (rev 27)
@@ -1,50 +0,0 @@
-Binary files nagios-plugins-1.4.15.original/plugins/check_procs and nagios-plugins-1.4.15/plugins/check_procs differ
-diff -ur nagios-plugins-1.4.15.original/plugins/check_procs.c nagios-plugins-1.4.15/plugins/check_procs.c
---- nagios-plugins-1.4.15.original/plugins/check_procs.c 2010-07-27 20:47:16.000000000 +0000
-+++ nagios-plugins-1.4.15/plugins/check_procs.c 2011-01-21 13:10:07.000000000 +0000
-@@ -318,6 +318,8 @@
- int err;
- int cflags = REG_NOSUB | REG_EXTENDED;
- char errbuf[MAX_INPUT_BUFFER];
-+ char *temp_string;
-+ int i=0;
- static struct option longopts[] = {
- {"warning", required_argument, 0, 'w'},
- {"critical", required_argument, 0, 'c'},
-@@ -450,7 +452,14 @@
- regerror (err, &re_args, errbuf, MAX_INPUT_BUFFER);
- die (STATE_UNKNOWN, "PROCS %s: %s - %s\n", _("UNKNOWN"), _("Could not compile regular _expression_"), errbuf);
- }
-- asprintf (&fmt, "%s%sregex args '%s'", (fmt ? fmt : ""), (options ? ", " : ""), optarg);
-+ /* Strip off any | within the regex optarg */
-+ temp_string = strdup(optarg);
-+ while(temp_string[i]!='\0'){
-+ if(temp_string[i]=='|')
-+ temp_string[i]=',';
-+ i++;
-+ }
-+ asprintf (&fmt, "%s%sregex args '%s'", (fmt ? fmt : ""), (options ? ", " : ""), temp_string);
- options |= EREG_ARGS;
- break;
- case 'r': /* RSS */
-Binary files nagios-plugins-1.4.15.original/plugins/check_procs.o and nagios-plugins-1.4.15/plugins/check_procs.o differ
-diff -ur nagios-plugins-1.4.15.original/plugins/tests/check_procs.t nagios-plugins-1.4.15/plugins/tests/check_procs.t
---- nagios-plugins-1.4.15.original/plugins/tests/check_procs.t 2010-07-27 20:47:16.000000000 +0000
-+++ nagios-plugins-1.4.15/plugins/tests/check_procs.t 2011-01-21 12:56:31.000000000 +0000
-@@ -8,7 +8,7 @@
- use NPTest;
-
- if (-x "./check_procs") {
-- plan tests => 48;
-+ plan tests => 50;
- } else {
- plan skip_all => "No check_procs compiled";
- }
-@@ -113,3 +113,7 @@
- is( $result->return_code, 2, "Checking against RSS > 70MB" );
- is( $result->output, 'RSS CRITICAL: 5 crit, 0 warn out of 95 processes [WindowServer, SystemUIServer, Safari, Mail, Safari]', "Output correct" );
-
-+$result = NPTest->testCmd( "$command --ereg-argument-array='(nosuchname|nosuch2name)'" );
-+is( $result->return_code, 0, "Checking no pipe symbol in output" );
-+is( $result->output, "PROCS OK: 0 processes with regex args '(nosuchname,nosuch2name)'", "Output correct" );
-+
Modified: trunk/patches/nagiosplug_check_snmp_override_perfstat_units.patch
===================================================================
--- trunk/patches/nagiosplug_check_snmp_override_perfstat_units.patch 2012-07-31 12:27:45 UTC (rev 26)
+++ trunk/patches/nagiosplug_check_snmp_override_perfstat_units.patch 2012-07-31 13:58:33 UTC (rev 27)
@@ -1,7 +1,8 @@
-diff -ur nagios-plugins-1.4.15.orig/plugins/check_snmp.c nagios-plugins-1.4.15/plugins/check_snmp.c
---- nagios-plugins-1.4.15.orig/plugins/check_snmp.c 2012-07-18 10:17:59.000000000 +0000
-+++ nagios-plugins-1.4.15/plugins/check_snmp.c 2012-07-26 12:00:10.000000000 +0000
-@@ -113,16 +113,20 @@
+diff --git a/plugins/check_snmp.c b/plugins/check_snmp.c
+index 2d9861b..d03f8cf 100644
+--- a/plugins/check_snmp.c
++++ b/plugins/check_snmp.c
+@@ -113,16 +113,20 @@ char *privpasswd = NULL;
char **oids = NULL;
char *label;
char *units;
@@ -22,7 +23,7 @@
int numoids = 0;
int numauthpriv = 0;
int verbose = 0;
-@@ -181,11 +185,13 @@
+@@ -183,11 +187,13 @@ main (int argc, char **argv)
labels = malloc (labels_size);
unitv = malloc (unitv_size);
@@ -36,7 +37,7 @@
port = strdup (DEFAULT_PORT);
outbuff = strdup ("");
delimiter = strdup (" = ");
-@@ -396,6 +402,12 @@
+@@ -398,6 +404,12 @@ main (int argc, char **argv)
else
show = response;
@@ -49,7 +50,7 @@
iresult = STATE_DEPENDENT;
/* Process this block for numeric comparisons */
-@@ -569,6 +581,7 @@
+@@ -582,6 +594,7 @@ process_arguments (int argc, char **argv)
{"eregi", required_argument, 0, 'R'},
{"label", required_argument, 0, 'l'},
{"units", required_argument, 0, 'u'},
@@ -57,16 +58,16 @@
{"port", required_argument, 0, 'p'},
{"retries", required_argument, 0, 'e'},
{"miblist", required_argument, 0, 'm'},
-@@ -600,7 +613,7 @@
+@@ -614,7 +627,7 @@ process_arguments (int argc, char **argv)
}
while (1) {
-- c = getopt_long (argc, argv, "nhvVt:c:w:H:C:o:e:E:d:D:s:t:R:r:l:u:p:m:P:L:U:a:x:A:X:",
-+ c = getopt_long (argc, argv, "nhvVt:c:w:H:C:o:e:E:d:D:s:t:R:r:l:u:p:m:P:L:U:a:x:A:X:T:",
+- c = getopt_long (argc, argv, "nhvVOt:c:w:H:C:o:e:E:d:D:s:t:R:r:l:u:p:m:P:L:U:a:x:A:X:",
++ c = getopt_long (argc, argv, "nhvVOt:c:w:H:C:o:e:E:d:D:s:t:R:r:l:u:p:m:P:L:U:a:x:A:X:T:",
longopts, &option);
if (c == -1 || c == EOF)
-@@ -786,6 +799,35 @@
+@@ -800,6 +813,35 @@ process_arguments (int argc, char **argv)
unitv[nunits - 1] = ptr;
}
break;
@@ -102,7 +103,7 @@
case L_CALCULATE_RATE:
if(calculate_rate==0)
np_enable_state(NULL, 1);
-@@ -1056,6 +1098,8 @@
+@@ -1073,6 +1115,8 @@ print_help (void)
printf (" %s\n", _("Prefix label for output from plugin"));
printf (" %s\n", "-u, --units=STRING");
printf (" %s\n", _("Units label(s) for output data (e.g., 'sec.')."));
Deleted: trunk/patches/nagiosplug_check_snmp_remove_is_numeric.patch
===================================================================
--- trunk/patches/nagiosplug_check_snmp_remove_is_numeric.patch 2012-07-31 12:27:45 UTC (rev 26)
+++ trunk/patches/nagiosplug_check_snmp_remove_is_numeric.patch 2012-07-31 13:58:33 UTC (rev 27)
@@ -1,60 +0,0 @@
---- check_snmp.c 2010-07-27 20:47:16.000000000 +0000
-+++ /tmp/check_snmp.c 2011-04-12 09:33:50.000000000 +0000
-@@ -169,7 +169,6 @@
- char *state_string=NULL;
- size_t response_length, current_length, string_length;
- char *temp_string=NULL;
-- int is_numeric=0;
- time_t current_time;
- double temp_double;
- time_t duration;
-@@ -335,29 +334,24 @@
- /* We strip out the datatype indicator for PHBs */
- if (strstr (response, "Gauge: ")) {
- show = strstr (response, "Gauge: ") + 7;
-- is_numeric++;
- }
- else if (strstr (response, "Gauge32: ")) {
- show = strstr (response, "Gauge32: ") + 9;
-- is_numeric++;
- }
- else if (strstr (response, "Counter32: ")) {
- show = strstr (response, "Counter32: ") + 11;
-- is_numeric++;
- is_counter=1;
- if(!calculate_rate)
- strcpy(type, "c");
- }
- else if (strstr (response, "Counter64: ")) {
- show = strstr (response, "Counter64: ") + 11;
-- is_numeric++;
- is_counter=1;
- if(!calculate_rate)
- strcpy(type, "c");
- }
- else if (strstr (response, "INTEGER: ")) {
- show = strstr (response, "INTEGER: ") + 9;
-- is_numeric++;
- }
- else if (strstr (response, "STRING: ")) {
- show = strstr (response, "STRING: ") + 8;
-@@ -396,15 +390,17 @@
- }
-
- }
-- else if (strstr (response, "Timeticks: "))
-+ else if (strstr (response, "Timeticks: ")) {
- show = strstr (response, "Timeticks: ");
-+ }
- else
- show = response;
-
- iresult = STATE_DEPENDENT;
-
- /* Process this block for numeric comparisons */
-- if (is_numeric) {
-+ /* Make some special values,like Timeticks numeric only if a threshold is defined */
-+ if (thlds[i]->warning || thlds[i]->critical || calculate_rate) {
- ptr = strpbrk (show, "0123456789");
- if (ptr == NULL)
- die (STATE_UNKNOWN,_("No valid data returned"));