From 402460f038d3d6896ef92bbd636e7d02b8fb4907 Mon Sep 17 00:00:00 2001 From: Daniel Nelson Date: Wed, 27 Sep 2017 11:36:41 -0700 Subject: [PATCH] Use underscore as default opentsdb seperator Preserves backwards compatibility --- plugins/outputs/opentsdb/opentsdb.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/plugins/outputs/opentsdb/opentsdb.go b/plugins/outputs/opentsdb/opentsdb.go index 2e8cb746d..51d20117b 100644 --- a/plugins/outputs/opentsdb/opentsdb.go +++ b/plugins/outputs/opentsdb/opentsdb.go @@ -22,6 +22,7 @@ var ( `%`, "-", "#", "-", "$", "-") + defaultSeperator = "_" ) type OpenTSDB struct { @@ -56,8 +57,8 @@ var sampleConfig = ` ## Debug true - Prints OpenTSDB communication debug = false - ## Separator separates measurements - separator = "." + ## Separator separates measurement name from field + separator = "_" ` func ToLineFormat(tags map[string]string) string { @@ -258,6 +259,8 @@ func sanitize(value string) string { func init() { outputs.Add("opentsdb", func() telegraf.Output { - return &OpenTSDB{} + return &OpenTSDB{ + Separator: defaultSeperator, + } }) }