Changelog update and go fmt

This commit is contained in:
Cameron Sparr 2017-01-13 14:27:20 +00:00
parent 338f01a8da
commit 3551fbff4d
2 changed files with 25 additions and 23 deletions

View File

@ -4,6 +4,8 @@
### Features ### Features
- [#2137](https://github.com/influxdata/telegraf/pull/2137): Added userstats to mysql input plugin.
### Bugfixes ### Bugfixes
- [#2077](https://github.com/influxdata/telegraf/issues/2077): SQL Server Input - Arithmetic overflow error converting numeric to data type int. - [#2077](https://github.com/influxdata/telegraf/issues/2077): SQL Server Input - Arithmetic overflow error converting numeric to data type int.

View File

@ -683,7 +683,7 @@ func (m *Mysql) gatherGlobalVariables(db *sql.DB, serv string, acc telegraf.Accu
return err return err
} }
key = strings.ToLower(key) key = strings.ToLower(key)
// parse mysql version and put into field and tag // parse mysql version and put into field and tag
if strings.Contains(key, "version") { if strings.Contains(key, "version") {
fields[key] = string(val) fields[key] = string(val)
tags[key] = string(val) tags[key] = string(val)
@ -950,28 +950,28 @@ func (m *Mysql) gatherGlobalStatuses(db *sql.DB, serv string, acc telegraf.Accum
tags := map[string]string{"server": servtag, "user": user} tags := map[string]string{"server": servtag, "user": user}
fields := map[string]interface{}{ fields := map[string]interface{}{
"total_connections": total_connections, "total_connections": total_connections,
"concurrent_connections": concurrent_connections, "concurrent_connections": concurrent_connections,
"connected_time": connected_time, "connected_time": connected_time,
"busy_time": busy_time, "busy_time": busy_time,
"cpu_time": cpu_time, "cpu_time": cpu_time,
"bytes_received": bytes_received, "bytes_received": bytes_received,
"bytes_sent": bytes_sent, "bytes_sent": bytes_sent,
"binlog_bytes_written": binlog_bytes_written, "binlog_bytes_written": binlog_bytes_written,
"rows_fetched": rows_fetched, "rows_fetched": rows_fetched,
"rows_updated": rows_updated, "rows_updated": rows_updated,
"table_rows_read": table_rows_read, "table_rows_read": table_rows_read,
"select_commands": select_commands, "select_commands": select_commands,
"update_commands": update_commands, "update_commands": update_commands,
"other_commands": other_commands, "other_commands": other_commands,
"commit_transactions": commit_transactions, "commit_transactions": commit_transactions,
"rollback_transactions": rollback_transactions, "rollback_transactions": rollback_transactions,
"denied_connections": denied_connections, "denied_connections": denied_connections,
"lost_connections": lost_connections, "lost_connections": lost_connections,
"access_denied": access_denied, "access_denied": access_denied,
"empty_queries": empty_queries, "empty_queries": empty_queries,
"total_ssl_connections": total_ssl_connections, "total_ssl_connections": total_ssl_connections,
} }
acc.AddFields("mysql_user_stats", fields, tags) acc.AddFields("mysql_user_stats", fields, tags)
} }