Merge pull request #891 from jipperinbham/librato-serialize-fix

replace @ character with - for librato
This commit is contained in:
Cameron Sparr 2016-03-18 17:00:00 -06:00
commit 22073042a9
1 changed files with 4 additions and 1 deletions

View File

@ -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) {