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
This commit is contained in:
parent
a5f2d5ff21
commit
b705608b04
|
@ -22,6 +22,7 @@ same type can be specified, like this:
|
||||||
```
|
```
|
||||||
|
|
||||||
- Riemann output added
|
- Riemann output added
|
||||||
|
- Aerospike plugin: tag changed from `host` -> `aerospike_host`
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
- [#379](https://github.com/influxdb/telegraf/pull/379): Riemann output, thanks @allenj!
|
- [#379](https://github.com/influxdb/telegraf/pull/379): Riemann output, thanks @allenj!
|
||||||
|
|
|
@ -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) {
|
func readAerospikeStats(stats map[string]string, acc plugins.Accumulator, host, namespace string) {
|
||||||
for key, value := range stats {
|
for key, value := range stats {
|
||||||
tags := map[string]string{
|
tags := map[string]string{
|
||||||
"host": host,
|
"aerospike_host": host,
|
||||||
"namespace": "_service",
|
"namespace": "_service",
|
||||||
}
|
}
|
||||||
|
|
||||||
if namespace != "" {
|
if namespace != "" {
|
||||||
|
|
|
@ -67,8 +67,8 @@ func TestReadAerospikeStatsNamespace(t *testing.T) {
|
||||||
readAerospikeStats(stats, &acc, "host1", "test")
|
readAerospikeStats(stats, &acc, "host1", "test")
|
||||||
|
|
||||||
tags := map[string]string{
|
tags := map[string]string{
|
||||||
"host": "host1",
|
"aerospike_host": "host1",
|
||||||
"namespace": "test",
|
"namespace": "test",
|
||||||
}
|
}
|
||||||
for k := range stats {
|
for k := range stats {
|
||||||
assert.True(t, acc.ValidateTaggedValue(k, int64(12345), tags) == nil)
|
assert.True(t, acc.ValidateTaggedValue(k, int64(12345), tags) == nil)
|
||||||
|
|
Loading…
Reference in New Issue