From 898798bd493b39de192bfdb83dae21524aa5c8fb Mon Sep 17 00:00:00 2001 From: Larry Kim Date: Sun, 17 Apr 2016 02:00:52 +0900 Subject: [PATCH] Possible bug fix for oid_key collision --- plugins/inputs/snmp/snmp.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/inputs/snmp/snmp.go b/plugins/inputs/snmp/snmp.go index 4c2de93c9..9c810b2fc 100644 --- a/plugins/inputs/snmp/snmp.go +++ b/plugins/inputs/snmp/snmp.go @@ -732,7 +732,7 @@ func (h *Host) HandleResponse(oids map[string]Data, result *gosnmp.SnmpPacket, a break nextresult } } - if strings.HasPrefix(variable.Name, oid_key) { + if variable.Name == oid_key { switch variable.Type { // handle Metrics case gosnmp.Boolean, gosnmp.Integer, gosnmp.Counter32, gosnmp.Gauge32,