sanitize known issue characters from graphite tag name
This commit is contained in:
@@ -12,6 +12,8 @@ type GraphiteSerializer struct {
|
||||
Prefix string
|
||||
}
|
||||
|
||||
var sanitizedChars = strings.NewReplacer("/", "-", "@", "-", " ", "_")
|
||||
|
||||
func (s *GraphiteSerializer) Serialize(metric telegraf.Metric) ([]string, error) {
|
||||
out := []string{}
|
||||
|
||||
@@ -85,5 +87,5 @@ func buildTags(metric telegraf.Metric) string {
|
||||
tag_str += "." + tag_value
|
||||
}
|
||||
}
|
||||
return tag_str
|
||||
return sanitizedChars.Replace(tag_str)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user