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:
Patrick Hemmer
2018-05-29 22:03:37 -04:00
committed by Daniel Nelson
parent 59f0a5354f
commit 5ae2b02f5d
6 changed files with 35 additions and 10 deletions

View File

@@ -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