Skip to content

Commit

Permalink
Add MySQL server address tag to all measurements
Browse files Browse the repository at this point in the history
Closes #138
  • Loading branch information
sparrc committed Aug 25, 2015
1 parent 8a6665c commit 74c29e2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- [#133](https://github.com/influxdb/telegraf/pull/133): Add plugin.Gather error logging. Thanks @nickscript0!
- [#136](https://github.com/influxdb/telegraf/issues/136): Add a -usage flag for printing usage of a single plugin.
- [#137](https://github.com/influxdb/telegraf/issues/137): Memcached: fix when a value contains a space
- [#138](https://github.com/influxdb/telegraf/issues/138): MySQL server address tag.

### Bugfixes
- [#128](https://github.com/influxdb/telegraf/issues/128): system_load measurement missing.
Expand Down
2 changes: 1 addition & 1 deletion plugins/memcached/memcached.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func (m *Memcached) gatherServer(address string, acc plugins.Accumulator) error
values[string(s[1])] = string(s[2])
}

//
// Add server address as a tag
tags := map[string]string{"server": address}

// Process values
Expand Down
3 changes: 3 additions & 0 deletions plugins/mysql/mysql.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ func (m *Mysql) gatherServer(serv string, acc plugins.Accumulator) error {
continue
}

// Add server address as a tag
tags := map[string]string{"server": serv}

switch name {
case "Queries":
i, err := strconv.ParseInt(string(val.([]byte)), 10, 64)
Expand Down

0 comments on commit 74c29e2

Please sign in to comment.