adding the tags in the graylog output plugin
This commit is contained in:
parent
0af0fa7c2e
commit
268638db11
|
@ -226,6 +226,13 @@ func serialize(metric telegraf.Metric) ([]string, error) {
|
|||
m["host"] = host
|
||||
}
|
||||
|
||||
for key, value := range metric.Tags() {
|
||||
nkey := fmt.Sprintf("_%s", key)
|
||||
if key != "host" {
|
||||
m[nkey] = value
|
||||
}
|
||||
}
|
||||
|
||||
for key, value := range metric.Fields() {
|
||||
nkey := fmt.Sprintf("_%s", key)
|
||||
m[nkey] = value
|
||||
|
|
Loading…
Reference in New Issue