From 4f0c7fa057a8b050abc5c1ddde782fe11c9033be Mon Sep 17 00:00:00 2001 From: Sean Porter Date: Mon, 10 Dec 2018 16:59:02 -0800 Subject: [PATCH] put the influx segment count validation catch-all back in Signed-off-by: Sean Porter --- main.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index efc2ae1..f2f42d1 100644 --- a/main.go +++ b/main.go @@ -106,7 +106,10 @@ func CreateInfluxMetrics(samples model.Vector, metricPrefix string) string { metric += fmt.Sprintf(" value=%s %d\n", value, timestamp) - metrics += metric + segments := strings.Split(metric, " ") + if len(segments) == 3 { + metrics += metric + } } return metrics