Skip to content

Commit

Permalink
Change aerospike plugin server tag to aerospike_host
Browse files Browse the repository at this point in the history
This is to avoid a conflict with the standard "host" tag that is
used everywhere.

closes #399
  • Loading branch information
oldmantaiter authored and sparrc committed Nov 30, 2015
1 parent a5f2d5f commit b705608
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand Down
4 changes: 2 additions & 2 deletions plugins/aerospike/aerospike.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 != "" {
Expand Down
4 changes: 2 additions & 2 deletions plugins/aerospike/aerospike_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b705608

Please sign in to comment.