From 61443026ed951b32d2483747fdadaa9dcbc48687 Mon Sep 17 00:00:00 2001 From: nickscript0 Date: Tue, 1 Sep 2015 11:30:56 -0600 Subject: [PATCH 1/3] add additional MySQL metrics --- plugins/mysql/mysql.go | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/plugins/mysql/mysql.go b/plugins/mysql/mysql.go index 1bc72ff2a38b5..d53e580c7bf16 100644 --- a/plugins/mysql/mysql.go +++ b/plugins/mysql/mysql.go @@ -58,6 +58,10 @@ type mapping struct { } var mappings = []*mapping{ + { + onServer: "Aborted_", + inExport: "aborted_", + }, { onServer: "Bytes_", inExport: "bytes_", @@ -66,6 +70,10 @@ var mappings = []*mapping{ onServer: "Com_", inExport: "commands_", }, + { + onServer: "Created_", + inExport: "created_", + }, { onServer: "Handler_", inExport: "handler_", @@ -74,6 +82,26 @@ var mappings = []*mapping{ onServer: "Innodb_", inExport: "innodb_", }, + { + onServer: "Key_", + inExport: "key_", + }, + { + onServer: "Open_", + inExport: "open_", + }, + { + onServer: "Opened_", + inExport: "opened_", + }, + { + onServer: "Qcache_", + inExport: "qcache_", + }, + { + onServer: "Table_", + inExport: "table_", + }, { onServer: "Tokudb_", inExport: "tokudb_", From c4e020e50fd8f0035179af4531fa8b797186ace4 Mon Sep 17 00:00:00 2001 From: nickscript0 Date: Wed, 2 Sep 2015 10:03:05 -0600 Subject: [PATCH 2/3] add additional metrics to mysql plugin tests --- plugins/mysql/mysql_test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plugins/mysql/mysql_test.go b/plugins/mysql/mysql_test.go index b4c29146e51b4..8a284ca0222a8 100644 --- a/plugins/mysql/mysql_test.go +++ b/plugins/mysql/mysql_test.go @@ -33,6 +33,13 @@ func TestMysqlGeneratesMetrics(t *testing.T) { {"bytes", 2}, {"innodb", 51}, {"threads", 4}, + {"aborted", 2}, + {"created", 3}, + {"key", 7}, + {"open", 7}, + {"opened", 3}, + {"qcache", 8}, + {"table", 5}, } intMetrics := []string{ From d26cbf9a0372bdbcb3b9fb0981fd60c58388186f Mon Sep 17 00:00:00 2001 From: nickscript0 Date: Wed, 2 Sep 2015 11:26:37 -0600 Subject: [PATCH 3/3] Update CHANGELOG.md --- CHANGELOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 940df2cab5c5d..c7ef051cb01ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,9 @@ ## v0.1.8 [unreleased] ### Features - -[#150](https://github.com/influxdb/telegraf/pull/150): Add Host Uptime metric to system plugin -[#158](https://github.com/influxdb/telegraf/pull/158): Apache Plugin. Thanks @KPACHbIuLLIAnO4 +- [#150](https://github.com/influxdb/telegraf/pull/150): Add Host Uptime metric to system plugin +- [#158](https://github.com/influxdb/telegraf/pull/158): Apache Plugin. Thanks @KPACHbIuLLIAnO4 +- [#165](https://github.com/influxdb/telegraf/pull/165): Add additional metrics to mysql plugin. Thanks @nickscript0 ### Bugfixes