From 5ea289dc9d7bfeac588a13ab55034950e2f941db Mon Sep 17 00:00:00 2001 From: Pierre Tessier Date: Mon, 11 Jun 2018 17:54:08 -0400 Subject: [PATCH] Remove tags with empty values from Wavefront output (#4266) --- plugins/outputs/wavefront/wavefront.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/plugins/outputs/wavefront/wavefront.go b/plugins/outputs/wavefront/wavefront.go index 1e015c9f0..18c5a6495 100644 --- a/plugins/outputs/wavefront/wavefront.go +++ b/plugins/outputs/wavefront/wavefront.go @@ -180,6 +180,14 @@ func buildMetrics(m telegraf.Metric, w *Wavefront) []*MetricPoint { } func buildTags(mTags map[string]string, w *Wavefront) (string, map[string]string) { + + // Remove all empty tags. + for k, v := range mTags { + if v == "" { + delete(mTags, k) + } + } + var source string sourceTagFound := false