From 5b0c3951f64a9d6b1d298c9bc01c9df73635c28e Mon Sep 17 00:00:00 2001 From: JP Date: Fri, 18 Mar 2016 11:25:51 -0500 Subject: [PATCH] replace @ character with - for librato --- plugins/outputs/librato/librato.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/outputs/librato/librato.go b/plugins/outputs/librato/librato.go index ed15350fc..406f45361 100644 --- a/plugins/outputs/librato/librato.go +++ b/plugins/outputs/librato/librato.go @@ -159,7 +159,10 @@ func (l *Librato) buildGaugeName(m telegraf.Metric, fieldName string) string { serializedMetric := graphiteSerializer.SerializeBucketName(m, fieldName) // Deal with slash characters: - return strings.Replace(serializedMetric, "/", "-", -1) + replacedString := strings.Replace(serializedMetric, "/", "-", -1) + // Deal with @ characters: + replacedString = strings.Replace(replacedString, "@", "-", -1) + return replacedString } func (l *Librato) buildGauges(m telegraf.Metric) ([]*Gauge, error) {