From a165c1c7c06bf5ff2333972e41e0937204a0648a Mon Sep 17 00:00:00 2001 From: Sergio Jimenez Date: Sun, 31 Jan 2016 23:14:10 +0100 Subject: [PATCH] Don't add port to tags just the host --- plugins/inputs/mesos/mesos.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/inputs/mesos/mesos.go b/plugins/inputs/mesos/mesos.go index aede459fc..1607b1b42 100644 --- a/plugins/inputs/mesos/mesos.go +++ b/plugins/inputs/mesos/mesos.go @@ -211,12 +211,14 @@ func (m *Mesos) Gather(acc telegraf.Accumulator) error { func (m *Mesos) gatherMetrics(a string, acc telegraf.Accumulator) error { var jsonOut map[string]interface{} - if _, _, err := net.SplitHostPort(a); err != nil { + host, _, err := net.SplitHostPort(a) + if err != nil { + host = a a = a + ":5050" } tags := map[string]string{ - "server": a, + "server": host, } // TODO: Use Timeout