From 4e786f83decca053c98293fc4a4a555e4d247c1a Mon Sep 17 00:00:00 2001 From: Jérémie Courrèges-Anglas Date: Sat, 25 Jul 2015 20:02:14 -0600 Subject: sslutils: Check if OpenSSL supports SSLv3. --- plugins/sslutils.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'plugins') diff --git a/plugins/sslutils.c b/plugins/sslutils.c index d0ae4741..4933dd0d 100644 --- a/plugins/sslutils.c +++ b/plugins/sslutils.c @@ -66,7 +66,12 @@ int np_net_ssl_init_with_hostname_version_and_cert(int sd, char *host_name, int #endif break; case 3: /* SSLv3 protocol */ +#if defined(OPENSSL_NO_SSL3) + printf(("%s\n", _("CRITICAL - SSL protocol version 3 is not supported by your SSL library."))); + return STATE_CRITICAL; +#else method = SSLv3_client_method(); +#endif break; default: /* Unsupported */ printf("%s\n", _("CRITICAL - Unsupported SSL protocol version.")); -- cgit v1.2.3-74-g34f1 From 1c0ec88152125624c35e0d675efde65fee7bf8df Mon Sep 17 00:00:00 2001 From: Sven Nierlein Date: Thu, 1 Oct 2015 17:05:47 +0200 Subject: travis: fix http test host Signed-off-by: Sven Nierlein --- plugins/t/NPTest.cache.travis | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/t/NPTest.cache.travis b/plugins/t/NPTest.cache.travis index 4ebfb90e..ce798c21 100644 --- a/plugins/t/NPTest.cache.travis +++ b/plugins/t/NPTest.cache.travis @@ -17,7 +17,7 @@ 'NP_HOST_HPJD_PORT_INVALID' => '161', 'NP_HOST_HPJD_PORT_VALID' => '', 'NP_HOST_TCP_HTTP' => 'localhost', - 'NP_HOST_TCP_HTTP2' => 'labs.consol.de', + 'NP_HOST_TCP_HTTP2' => 'test.monitoring-plugins.org', 'NP_HOST_TCP_IMAP' => 'imap.web.de', 'NP_HOST_TCP_POP' => 'pop.web.de', 'NP_HOST_TCP_SMTP' => 'localhost', -- cgit v1.2.3-74-g34f1 From 0b8041226446572eba0f82316716622f57d715e0 Mon Sep 17 00:00:00 2001 From: Louis Sautier Date: Fri, 27 Mar 2015 13:16:42 +0100 Subject: Fix incorrect performance data thresholds Closes #1330 --- plugins/check_ups.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'plugins') diff --git a/plugins/check_ups.c b/plugins/check_ups.c index 099881d0..fd8c2d13 100644 --- a/plugins/check_ups.c +++ b/plugins/check_ups.c @@ -242,8 +242,8 @@ main (int argc, char **argv) } xasprintf (&data, "%s %s", data, perfdata ("battery", (long)ups_battery_percent, "%", - check_warn, (long)(1000*warning_value), - check_crit, (long)(1000*critical_value), + check_warn, (long)(warning_value), + check_crit, (long)(critical_value), TRUE, 0, TRUE, 100)); } else { xasprintf (&data, "%s %s", data, @@ -271,8 +271,8 @@ main (int argc, char **argv) } xasprintf (&data, "%s %s", data, perfdata ("load", (long)ups_load_percent, "%", - check_warn, (long)(1000*warning_value), - check_crit, (long)(1000*critical_value), + check_warn, (long)(warning_value), + check_crit, (long)(critical_value), TRUE, 0, TRUE, 100)); } else { xasprintf (&data, "%s %s", data, @@ -308,8 +308,8 @@ main (int argc, char **argv) } xasprintf (&data, "%s %s", data, perfdata ("temp", (long)ups_temperature, tunits, - check_warn, (long)(1000*warning_value), - check_crit, (long)(1000*critical_value), + check_warn, (long)(warning_value), + check_crit, (long)(critical_value), TRUE, 0, FALSE, 0)); } else { xasprintf (&data, "%s %s", data, -- cgit v1.2.3-74-g34f1 From 6ba26122f4746a7e16272b1b9546342820400a78 Mon Sep 17 00:00:00 2001 From: Oliver Skibbe Date: Fri, 6 Mar 2015 11:51:45 +0100 Subject: check_snmp.c: switched DEFAULT_TIMEOUT to DEFAULT_SOCKET_TIMEOUT (provided by utils.h), already used by help description, see issue #1318 --- plugins/check_snmp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/check_snmp.c b/plugins/check_snmp.c index 2c62a230..6d7ec6d9 100644 --- a/plugins/check_snmp.c +++ b/plugins/check_snmp.c @@ -41,7 +41,6 @@ const char *email = "devel@monitoring-plugins.org"; #define DEFAULT_PORT "161" #define DEFAULT_MIBLIST "ALL" #define DEFAULT_PROTOCOL "1" -#define DEFAULT_TIMEOUT 1 #define DEFAULT_RETRIES 5 #define DEFAULT_AUTH_PROTOCOL "MD5" #define DEFAULT_PRIV_PROTOCOL "DES" @@ -224,7 +223,7 @@ main (int argc, char **argv) outbuff = strdup (""); delimiter = strdup (" = "); output_delim = strdup (DEFAULT_OUTPUT_DELIMITER); - timeout_interval = DEFAULT_TIMEOUT; + timeout_interval = DEFAULT_SOCKET_TIMEOUT; retries = DEFAULT_RETRIES; np_init( (char *) progname, argc, argv ); -- cgit v1.2.3-74-g34f1 From 2d677b19ed34ff8171dbf07fb7744e560737d143 Mon Sep 17 00:00:00 2001 From: Oliver Skibbe Date: Fri, 6 Mar 2015 12:43:34 +0100 Subject: check_snmp: modified tests (Closes #1325) --- plugins/t/check_snmp.t | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/t/check_snmp.t b/plugins/t/check_snmp.t index 2d6c44a7..aefd872a 100644 --- a/plugins/t/check_snmp.t +++ b/plugins/t/check_snmp.t @@ -166,8 +166,8 @@ SKIP: { SKIP: { skip "no non responsive host defined", 2 if ( ! $host_nonresponsive ); $res = NPTest->testCmd( "./check_snmp -H $host_nonresponsive -C np_foobar -o system.sysUpTime.0 -w 1: -c 1:"); - cmp_ok( $res->return_code, '==', 3, "Exit UNKNOWN with non responsive host" ); - like($res->output, '/External command error: Timeout: No Response from /', "String matches timeout problem"); + cmp_ok( $res->return_code, '==', 2, "Exit CRITICAL with non responsive host" ); + like($res->output, '/Plugin timed out while executing system call/', "String matches timeout problem"); } SKIP: { -- cgit v1.2.3-74-g34f1 From 0a406d8dcec816a94d283b872755b28f219bea2e Mon Sep 17 00:00:00 2001 From: Sebastian Herbszt Date: Sat, 20 Dec 2014 20:58:22 +0100 Subject: sslutils: remove superfluous parenthesis Remove superfluous parenthesis. Signed-off-by: Sebastian Herbszt --- plugins/sslutils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/sslutils.c b/plugins/sslutils.c index 4933dd0d..494a1ece 100644 --- a/plugins/sslutils.c +++ b/plugins/sslutils.c @@ -59,7 +59,7 @@ int np_net_ssl_init_with_hostname_version_and_cert(int sd, char *host_name, int break; case 2: /* SSLv2 protocol */ #if defined(USE_GNUTLS) || defined(OPENSSL_NO_SSL2) - printf(("%s\n", _("CRITICAL - SSL protocol version 2 is not supported by your SSL library."))); + printf("%s\n", _("CRITICAL - SSL protocol version 2 is not supported by your SSL library.")); return STATE_CRITICAL; #else method = SSLv2_client_method(); -- cgit v1.2.3-74-g34f1 From 8e661a3bd6c6892ed4db926eab769c167b0e9091 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Sun, 4 Oct 2015 15:11:40 +0200 Subject: sslutils: Remove superfluous parenthesis for sslv3 function too --- plugins/sslutils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/sslutils.c b/plugins/sslutils.c index 494a1ece..f34c3d79 100644 --- a/plugins/sslutils.c +++ b/plugins/sslutils.c @@ -67,7 +67,7 @@ int np_net_ssl_init_with_hostname_version_and_cert(int sd, char *host_name, int break; case 3: /* SSLv3 protocol */ #if defined(OPENSSL_NO_SSL3) - printf(("%s\n", _("CRITICAL - SSL protocol version 3 is not supported by your SSL library."))); + printf("%s\n", _("CRITICAL - SSL protocol version 3 is not supported by your SSL library.")); return STATE_CRITICAL; #else method = SSLv3_client_method(); -- cgit v1.2.3-74-g34f1