Skip to content

Commit 51649b0

Browse files
committed
hack where attr for if_AdminStatus and if_OperStatus are not set for other series
1 parent ffcdb72 commit 51649b0

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

pkg/formats/util/util.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,13 @@ func CopyAttrForSnmp(attr map[string]interface{}, metricName string, name kt.Met
461461
delete(attrNew, key)
462462
}
463463

464+
// These are getting dropped sometimes and we don't need to one in the other series.
465+
if metricName == "if_AdminStatus" {
466+
delete(attrNew, "if_OperStatus")
467+
} else if metricName == "if_OperStatus" {
468+
delete(attrNew, "if_AdminStatus")
469+
}
470+
464471
if len(attrNew) > MAX_ATTR_FOR_SNMP {
465472
// Since NR limits us to 100 attributes, we need to prune. Take the first 100 lexographical keys.
466473
keys := make([]string, len(attrNew))

0 commit comments

Comments
 (0)