fix(inputs.cisco_telemetry_mdt): add operation-metric and class-policy prefix (#12240)

This commit is contained in:
dd-accedian 2023-01-12 18:30:38 +03:00 committed by GitHub
parent 82ec689630
commit 5174fb1e94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 1 deletions

View File

@ -406,7 +406,14 @@ func (c *CiscoTelemetryMDT) handleTelemetry(data []byte) {
// Parse values
for _, subfield := range content.Fields {
c.parseContentField(grouper, subfield, "", msg.EncodingPath, tags, timestamp)
prefix := ""
switch subfield.Name {
case "operation-metric":
prefix = subfield.Fields[0].Fields[0].GetStringValue()
case "class-stats":
prefix = subfield.Fields[0].Fields[1].GetStringValue()
}
c.parseContentField(grouper, subfield, prefix, msg.EncodingPath, tags, timestamp)
}
}