Added userstats to mysql input plugin (#2137)

* Added GatherUserStatistics, row Uptime in gatherGlobalStatuses, and version fields & tags

* Updated README file

* pulling in latest from master

* ran go fmt to fix formatting

* fix unreachable code

* few fixes

* cleaning up and applying suggestions from sparrc
This commit is contained in:
acezellponce
2017-01-13 06:25:25 -08:00
committed by Cameron Sparr
parent b89c45b858
commit 0c9da0985a
2 changed files with 206 additions and 1 deletions

View File

@@ -7,6 +7,7 @@ This plugin gathers the statistic data from MySQL server
* Slave statuses
* Binlog size
* Process list
* User Statistics
* Info schema auto increment columns
* Table I/O waits
* Index I/O waits
@@ -44,6 +45,9 @@ This plugin gathers the statistic data from MySQL server
## gather thread state counts from INFORMATION_SCHEMA.PROCESSLIST
gather_process_list = true
#
## gather thread state counts from INFORMATION_SCHEMA.USER_STATISTICS
gather_user_statistics = true
#
## gather auto_increment columns and max values from information schema
gather_info_schema_auto_inc = true
#
@@ -89,6 +93,30 @@ Requires to be turned on in configuration.
* binary_files_count(int, number)
* Process list - connection metrics from processlist for each user. It has the following tags
* connections(int, number)
* User Statistics - connection metrics from user statistics for each user. It has the following fields
* access_denied
* binlog_bytes_written
* busy_time
* bytes_received
* bytes_sent
* commit_transactions
* concurrent_connections
* connected_time
* cpu_time
* denied_connections
* empty_queries
* hostlost_connections
* other_commands
* rollback_transactions
* rows_fetched
* rows_updated
* select_commands
* server
* table_rows_read
* total_connections
* total_ssl_connections
* update_commands
* user
* Perf Table IO waits - total count and time of I/O waits event for each table
and process. It has following fields:
* table_io_waits_total_fetch(float, number)
@@ -158,6 +186,8 @@ The unit of fields varies by the tags.
* server (the host name from which the metrics are gathered)
* Process list measurement has following tags
* user (username for whom the metrics are gathered)
* User Statistics measurement has following tags
* user (username for whom the metrics are gathered)
* Perf table IO waits measurement has following tags
* schema
* name (object name for event or process)