[Nagiosplug-devel] [ nagiosplug-Patches-3463985 ] Fixes for check_snmp
SourceForge.net
noreply at sourceforge.net
Thu Dec 22 14:34:18 CET 2011
Patches item #3463985, was opened at 2011-12-22 05:34
Message generated for change (Tracker Item Submitted) made by
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397599&aid=3463985&group_id=29880
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Sébastien Prud'homme ()
Assigned to: Nobody/Anonymous (nobody)
Summary: Fixes for check_snmp
Initial Comment:
A small patch:
- response should not start with the delimiter
- OID response value taken into account
--- nagios-plugins-1.4.15/plugins/check_snmp.c.rmap 2011-12-22 14:23:26.000000000 +0100
+++ nagios-plugins-1.4.15/plugins/check_snmp.c 2011-12-22 14:27:30.000000000 +0100
@@ -322,6 +322,7 @@
response = strstr (ptr, delimiter);
if (response == NULL)
break;
+ response = response + 3;
if (verbose > 2) {
printf("Processing oid %i (line %i)\n oidname: %s\n response: %s\n", i+1, line+1, oidname, response);
@@ -353,6 +354,9 @@
else if (strstr (response, "INTEGER: ")) {
show = strstr (response, "INTEGER: ") + 9;
}
+ else if (strstr (response, "OID: ")) {
+ show = strstr (response, "OID: ") + 5;
+ }
else if (strstr (response, "STRING: ")) {
show = strstr (response, "STRING: ") + 8;
conv = "%.10g";
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397599&aid=3463985&group_id=29880
More information about the Devel
mailing list