Add patches/13_check_snmp_timeout from upstream maint branch
This commit is contained in:
parent
0d487449b9
commit
fad70ed5f8
58
debian/patches/13_check_snmp_timeout
vendored
Normal file
58
debian/patches/13_check_snmp_timeout
vendored
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
From 6ba26122f4746a7e16272b1b9546342820400a78 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Oliver Skibbe <oliskibbe@gmail.com>
|
||||||
|
Date: Fri, 6 Mar 2015 11:51:45 +0100
|
||||||
|
Subject: [PATCH 1/2] 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(-)
|
||||||
|
|
||||||
|
diff --git a/plugins/check_snmp.c b/plugins/check_snmp.c
|
||||||
|
index 2c62a23..6d7ec6d 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 );
|
||||||
|
|
||||||
|
From 2d677b19ed34ff8171dbf07fb7744e560737d143 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Oliver Skibbe <oliskibbe@gmail.com>
|
||||||
|
Date: Fri, 6 Mar 2015 12:43:34 +0100
|
||||||
|
Subject: [PATCH 2/2] check_snmp: modified tests
|
||||||
|
|
||||||
|
(Closes #1325)
|
||||||
|
---
|
||||||
|
plugins/t/check_snmp.t | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/plugins/t/check_snmp.t b/plugins/t/check_snmp.t
|
||||||
|
index 2d6c44a..aefd872 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: {
|
1
debian/patches/series
vendored
1
debian/patches/series
vendored
|
@ -3,3 +3,4 @@
|
||||||
10_sslutils_checksslv3
|
10_sslutils_checksslv3
|
||||||
11_check_dhcp_parsing_option
|
11_check_dhcp_parsing_option
|
||||||
12_check_ups_perf_data_hresholds
|
12_check_ups_perf_data_hresholds
|
||||||
|
13_check_snmp_timeout
|
||||||
|
|
Loading…
Reference in a new issue