Skip to content

Commit

Permalink
replace @ character with - for librato
Browse files Browse the repository at this point in the history
  • Loading branch information
jipperinbham committed Mar 18, 2016
1 parent f2394b5 commit 5b0c395
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion plugins/outputs/librato/librato.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 5b0c395

Please sign in to comment.