Fix snmp overriding of auto-configured table fields (#4208)
Whenever the snmp plugin was configured with a table with automatic field discovery, if one of those fields was explicitly overridden in the config and the value of is_tag was changed, the field would be duplicated, once as a tag & once as a field. This change fixes the behavior so that if a field is explicitly configured, automatic table field discovery doesn't touch it.
This commit is contained in:
committed by
Daniel Nelson
parent
59f0a5354f
commit
5ae2b02f5d
7
plugins/inputs/snmp/testdata/test.mib
vendored
7
plugins/inputs/snmp/testdata/test.mib
vendored
@@ -22,6 +22,7 @@ TestTableEntry ::=
|
||||
server OCTET STRING,
|
||||
connections INTEGER,
|
||||
latency OCTET STRING,
|
||||
description OCTET STRING,
|
||||
}
|
||||
|
||||
server OBJECT-TYPE
|
||||
@@ -42,6 +43,12 @@ latency OBJECT-TYPE
|
||||
STATUS current
|
||||
::= { testTableEntry 3 }
|
||||
|
||||
description OBJECT-TYPE
|
||||
SYNTAX OCTET STRING
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
::= { testTableEntry 4 }
|
||||
|
||||
hostname OBJECT-TYPE
|
||||
SYNTAX OCTET STRING
|
||||
MAX-ACCESS read-only
|
||||
|
||||
Reference in New Issue
Block a user