From 7d4190d414f421d0c066db153b861d1cede9889b Mon Sep 17 00:00:00 2001 From: Josh Powers Date: Tue, 22 Aug 2023 06:13:51 -0600 Subject: [PATCH] fix(inputs.cisco_telemetry_mdt): Check for slice length fixes: #13789 --- plugins/inputs/cisco_telemetry_mdt/cisco_telemetry_mdt.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/inputs/cisco_telemetry_mdt/cisco_telemetry_mdt.go b/plugins/inputs/cisco_telemetry_mdt/cisco_telemetry_mdt.go index 61e9a7fedc64a..456606557379e 100644 --- a/plugins/inputs/cisco_telemetry_mdt/cisco_telemetry_mdt.go +++ b/plugins/inputs/cisco_telemetry_mdt/cisco_telemetry_mdt.go @@ -416,6 +416,10 @@ func (c *CiscoTelemetryMDT) handleTelemetry(data []byte) { if content != nil { // Parse values for _, subfield := range content.Fields { + if len(subfield.Fields) == 0 { + continue + } + prefix := "" switch subfield.Name { case "operation-metric":