0.3.0: postgresql and phpfpm

This commit is contained in:
Cameron Sparr
2015-12-18 17:09:01 -07:00
parent 9c5321c538
commit 64a832467e
3 changed files with 13 additions and 10 deletions

View File

@@ -198,9 +198,11 @@ func importMetric(r io.Reader, acc plugins.Accumulator, host string) (poolStat,
"url": host,
"pool": pool,
}
fields := make(map[string]interface{})
for k, v := range stats[pool] {
acc.Add(strings.Replace(k, " ", "_", -1), v, tags)
fields[strings.Replace(k, " ", "_", -1)] = v
}
acc.AddFields("phpfpm", fields, tags)
}
return stats, nil