Add numerical representation of Consul health check state. (#2277)

This commit is contained in:
John Engelman
2017-01-28 18:47:25 -06:00
committed by Cameron Sparr
parent 28314f93b6
commit ce2ad1a74c
4 changed files with 18 additions and 2 deletions

View File

@@ -97,7 +97,12 @@ func (c *Consul) GatherHealthCheck(acc telegraf.Accumulator, checks []*api.Healt
record["check_name"] = check.Name
record["service_id"] = check.ServiceID
record["status"] = check.Status
record["passing"] = 0
record["critical"] = 0
record["warning"] = 0
record[check.Status] = 1
tags["node"] = check.Node
tags["service_name"] = check.ServiceName