Use underscore as default opentsdb seperator

Preserves backwards compatibility
This commit is contained in:
Daniel Nelson 2017-09-27 11:36:41 -07:00
parent f85db90780
commit 402460f038
No known key found for this signature in database
GPG Key ID: CAAD59C9444F6155
1 changed files with 6 additions and 3 deletions

View File

@ -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,
}
})
}