summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Wagner <waja@cyconet.org>2015-10-02 12:57:25 +0200
committerSven Nierlein <sven@nierlein.de>2015-10-02 12:57:25 +0200
commit96932fd7b72a88dc6c694a2a8324464f3439bc23 (patch)
tree07707d2e2d7e7ae67b844feb4570b3edd92daa05
parent5818a3f24d21bd2905bd1d1ecc2ba11c6bf59678 (diff)
downloadmonitoring-plugins-96932fd7b72a88dc6c694a2a8324464f3439bc23.tar.gz
check_snmp: small improvement by anonymous submission
- response should not start with the delimiter - OID response value taken into account Closes issue #1029 Closes push request #1173
-rw-r--r--plugins/check_snmp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/check_snmp.c b/plugins/check_snmp.c
index 9d966faa..62e6b8b3 100644
--- a/plugins/check_snmp.c
+++ b/plugins/check_snmp.c
@@ -418,6 +418,9 @@ main (int argc, char **argv)
418 else if (strstr (response, "INTEGER: ")) { 418 else if (strstr (response, "INTEGER: ")) {
419 show = strstr (response, "INTEGER: ") + 9; 419 show = strstr (response, "INTEGER: ") + 9;
420 } 420 }
421 else if (strstr (response, "OID: ")) {
422 show = strstr (response, "OID: ") + 5;
423 }
421 else if (strstr (response, "STRING: ")) { 424 else if (strstr (response, "STRING: ")) {
422 show = strstr (response, "STRING: ") + 8; 425 show = strstr (response, "STRING: ") + 8;
423 conv = "%.10g"; 426 conv = "%.10g";