From b973833317a6f1e8e254cbc11719e228e37e49f5 Mon Sep 17 00:00:00 2001 From: Raphael Couto Date: Thu, 13 Dec 2018 17:57:03 -0200 Subject: [PATCH] Fix error sending empty tag value in azure monitor output (#5083) --- plugins/outputs/azure_monitor/azure_monitor.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/outputs/azure_monitor/azure_monitor.go b/plugins/outputs/azure_monitor/azure_monitor.go index 5c435ac0dbb9b..e52d66b991d9b 100644 --- a/plugins/outputs/azure_monitor/azure_monitor.go +++ b/plugins/outputs/azure_monitor/azure_monitor.go @@ -340,6 +340,10 @@ func hashIDWithTagKeysOnly(m telegraf.Metric) uint64 { h.Write([]byte(m.Name())) h.Write([]byte("\n")) for _, tag := range m.TagList() { + if tag.Key == "" || tag.Value == "" { + continue + } + h.Write([]byte(tag.Key)) h.Write([]byte("\n")) }