From 95bad9e55b635862a10af7b15976bda99301f0a4 Mon Sep 17 00:00:00 2001 From: Cameron Sparr Date: Fri, 13 Jan 2017 11:35:36 +0000 Subject: [PATCH] OpenTSDB filter types for HTTP AND telnet --- plugins/outputs/opentsdb/opentsdb.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/plugins/outputs/opentsdb/opentsdb.go b/plugins/outputs/opentsdb/opentsdb.go index ce797e10f..84ff99058 100644 --- a/plugins/outputs/opentsdb/opentsdb.go +++ b/plugins/outputs/opentsdb/opentsdb.go @@ -157,6 +157,15 @@ func (o *OpenTSDB) WriteTelnet(metrics []telegraf.Metric, u *url.URL) error { tags := ToLineFormat(cleanTags(m.Tags())) for fieldName, value := range m.Fields() { + switch value.(type) { + case int64: + case uint64: + case float64: + default: + log.Printf("D! OpenTSDB does not support metric value: [%s] of type [%T].\n", value, value) + continue + } + metricValue, buildError := buildValue(value) if buildError != nil { log.Printf("E! OpenTSDB: %s\n", buildError.Error())