diff --git a/CHANGELOG.md b/CHANGELOG.md index 990d417e5..c0c96476a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ### Features - [#2137](https://github.com/influxdata/telegraf/pull/2137): Added userstats to mysql input plugin. +- [#2179](https://github.com/influxdata/telegraf/pull/2179): Added more InnoDB metric to MySQL plugin. ### Bugfixes diff --git a/plugins/inputs/mysql/mysql.go b/plugins/inputs/mysql/mysql.go index 956b3f9b0..adc21880b 100644 --- a/plugins/inputs/mysql/mysql.go +++ b/plugins/inputs/mysql/mysql.go @@ -1076,12 +1076,7 @@ func (m *Mysql) GatherUserStatisticsStatuses(db *sql.DB, serv string, acc telegr count uint32 ) - var servtag string - servtag, err = parseDSN(serv) - if err != nil { - servtag = "localhost" - } - + servtag := getDSNTag(serv) for rows.Next() { err = rows.Scan(&user, &total_connections, &concurrent_connections, &connected_time, &busy_time, &cpu_time, &bytes_received, &bytes_sent, &binlog_bytes_written,