From 9b0e1e9c49d7709c6af3ac8e99c0a1cafd753831 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())