From d1c6609ca5fd1839f75ea6ebe8d298192f33a239 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Harasimowicz?= Date: Tue, 31 May 2016 10:41:25 +0200 Subject: [PATCH] Renamed Influx meausrement for Consul input plugin to "consul_health_checks" --- plugins/inputs/consul/consul.go | 2 +- plugins/inputs/consul/consul_test.go | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/inputs/consul/consul.go b/plugins/inputs/consul/consul.go index 715527f1480be..ca09305158e06 100644 --- a/plugins/inputs/consul/consul.go +++ b/plugins/inputs/consul/consul.go @@ -143,7 +143,7 @@ func (c *Consul) GatherHealthCheck(acc telegraf.Accumulator, checks []*api.Healt } } - acc.AddFields("consul", record, tags) + acc.AddFields("consul_health_checks", record, tags) } } diff --git a/plugins/inputs/consul/consul_test.go b/plugins/inputs/consul/consul_test.go index 4cf974fc754c4..cf20c26268455 100644 --- a/plugins/inputs/consul/consul_test.go +++ b/plugins/inputs/consul/consul_test.go @@ -39,7 +39,7 @@ func TestBasicConfig(t *testing.T) { consul.setDefaults() consul.GatherHealthCheck(&acc, sampleChecks) - acc.AssertContainsTaggedFields(t, "consul", expectedFields, expectedTags) + acc.AssertContainsTaggedFields(t, "consul_health_checks", expectedFields, expectedTags) } func TestAllFields(t *testing.T) { @@ -64,7 +64,7 @@ func TestAllFields(t *testing.T) { consul.Fields = []string{"check_id", "check_name", "service_id", "status", "output", "notes"} consul.GatherHealthCheck(&acc, sampleChecks) - acc.AssertContainsTaggedFields(t, "consul", expectedFields, expectedTags) + acc.AssertContainsTaggedFields(t, "consul_health_checks", expectedFields, expectedTags) } func TestCustomFields(t *testing.T) { @@ -85,7 +85,7 @@ func TestCustomFields(t *testing.T) { consul.Fields = []string{"check_id", "check_name"} consul.GatherHealthCheck(&acc, sampleChecks) - acc.AssertContainsTaggedFields(t, "consul", expectedFields, expectedTags) + acc.AssertContainsTaggedFields(t, "consul_health_checks", expectedFields, expectedTags) } func TestSetupTags(t *testing.T) { @@ -109,5 +109,5 @@ func TestSetupTags(t *testing.T) { consul.Tags = []string{"service_id"} consul.GatherHealthCheck(&acc, sampleChecks) - acc.AssertContainsTaggedFields(t, "consul", expectedFields, expectedTags) + acc.AssertContainsTaggedFields(t, "consul_health_checks", expectedFields, expectedTags) }