From b705608b04e6aacafce9f7c9ff45d2907b30684d Mon Sep 17 00:00:00 2001 From: Tait Clarridge Date: Sun, 29 Nov 2015 08:29:52 -0500 Subject: [PATCH] Change aerospike plugin server tag to aerospike_host This is to avoid a conflict with the standard "host" tag that is used everywhere. closes #399 --- CHANGELOG.md | 1 + plugins/aerospike/aerospike.go | 4 ++-- plugins/aerospike/aerospike_test.go | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6185bca35..fd54b575b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ same type can be specified, like this: ``` - Riemann output added +- Aerospike plugin: tag changed from `host` -> `aerospike_host` ### Features - [#379](https://github.com/influxdb/telegraf/pull/379): Riemann output, thanks @allenj! diff --git a/plugins/aerospike/aerospike.go b/plugins/aerospike/aerospike.go index 408887533..cf372aeb4 100644 --- a/plugins/aerospike/aerospike.go +++ b/plugins/aerospike/aerospike.go @@ -250,8 +250,8 @@ func get(key []byte, host string) (map[string]string, error) { func readAerospikeStats(stats map[string]string, acc plugins.Accumulator, host, namespace string) { for key, value := range stats { tags := map[string]string{ - "host": host, - "namespace": "_service", + "aerospike_host": host, + "namespace": "_service", } if namespace != "" { diff --git a/plugins/aerospike/aerospike_test.go b/plugins/aerospike/aerospike_test.go index badd305a2..532ebaafb 100644 --- a/plugins/aerospike/aerospike_test.go +++ b/plugins/aerospike/aerospike_test.go @@ -67,8 +67,8 @@ func TestReadAerospikeStatsNamespace(t *testing.T) { readAerospikeStats(stats, &acc, "host1", "test") tags := map[string]string{ - "host": "host1", - "namespace": "test", + "aerospike_host": "host1", + "namespace": "test", } for k := range stats { assert.True(t, acc.ValidateTaggedValue(k, int64(12345), tags) == nil)