@@ -21,71 +21,87 @@ This plugin gathers the statistic data from MySQL server
2121### Configuration
2222
2323``` toml
24- # Read metrics from one or many mysql servers
2524[[inputs .mysql ]]
2625 # # specify servers via a url matching:
27- # # [username[:password]@][protocol[(address)]]/[?tls=[true|false|skip-verify]]
26+ # # [username[:password]@][protocol[(address)]]/[?tls=[true|false|skip-verify|custom ]]
2827 # # see https://github.com/go-sql-driver/mysql#dsn-data-source-name
2928 # # e.g.
3029 # # servers = ["user:passwd@tcp(127.0.0.1:3306)/?tls=false"]
3130 # # servers = ["user@tcp(127.0.0.1:3306)/?tls=false"]
3231 #
3332 # # If no servers are specified, then localhost is used as the host.
3433 servers = [" tcp(127.0.0.1:3306)/" ]
35- # # the limits for metrics form perf_events_statements
36- perf_events_statements_digest_text_limit = 120
37- perf_events_statements_limit = 250
38- perf_events_statements_time_limit = 86400
39- #
40- # # if the list is empty, then metrics are gathered from all database tables
41- table_schema_databases = []
42- #
34+
35+ # # Selects the metric output format.
36+ # #
37+ # # This option exists to maintain backwards compatibility, if you have
38+ # # existing metrics do not set or change this value until you are ready to
39+ # # migrate to the new format.
40+ # #
41+ # # If you do not have existing metrics from this plugin set to the latest
42+ # # version.
43+ # #
44+ # # Telegraf >=1.6: metric_version = 2
45+ # # <1.6: metric_version = 1 (or unset)
46+ metric_version = 2
47+
48+ # # if the list is empty, then metrics are gathered from all databasee tables
49+ # table_schema_databases = []
50+
4351 # # gather metrics from INFORMATION_SCHEMA.TABLES for databases provided above list
44- gather_table_schema = false
45- #
52+ # gather_table_schema = false
53+
4654 # # gather thread state counts from INFORMATION_SCHEMA.PROCESSLIST
47- gather_process_list = true
48- #
49- # # gather thread state counts from INFORMATION_SCHEMA.USER_STATISTICS
50- gather_user_statistics = true
51- #
55+ # gather_process_list = false
56+
57+ # # gather user statistics from INFORMATION_SCHEMA.USER_STATISTICS
58+ # gather_user_statistics = false
59+
5260 # # gather auto_increment columns and max values from information schema
53- gather_info_schema_auto_inc = true
54- #
61+ # gather_info_schema_auto_inc = false
62+
5563 # # gather metrics from INFORMATION_SCHEMA.INNODB_METRICS
56- gather_innodb_metrics = true
57- #
64+ # gather_innodb_metrics = false
65+
5866 # # gather metrics from SHOW SLAVE STATUS command output
59- gather_slave_status = true
60- #
67+ # gather_slave_status = false
68+
6169 # # gather metrics from SHOW BINARY LOGS command output
62- gather_binary_logs = false
63- #
70+ # gather_binary_logs = false
71+
6472 # # gather metrics from PERFORMANCE_SCHEMA.TABLE_IO_WAITS_SUMMARY_BY_TABLE
65- gather_table_io_waits = false
66- #
73+ # gather_table_io_waits = false
74+
6775 # # gather metrics from PERFORMANCE_SCHEMA.TABLE_LOCK_WAITS
68- gather_table_lock_waits = false
69- #
76+ # gather_table_lock_waits = false
77+
7078 # # gather metrics from PERFORMANCE_SCHEMA.TABLE_IO_WAITS_SUMMARY_BY_INDEX_USAGE
71- gather_index_io_waits = false
72- #
79+ # gather_index_io_waits = false
80+
7381 # # gather metrics from PERFORMANCE_SCHEMA.EVENT_WAITS
74- gather_event_waits = false
75- #
82+ # gather_event_waits = false
83+
7684 # # gather metrics from PERFORMANCE_SCHEMA.FILE_SUMMARY_BY_EVENT_NAME
77- gather_file_events_stats = false
78- #
85+ # gather_file_events_stats = false
86+
7987 # # gather metrics from PERFORMANCE_SCHEMA.EVENTS_STATEMENTS_SUMMARY_BY_DIGEST
80- gather_perf_events_statements = false
81- #
88+ # gather_perf_events_statements = false
89+
90+ # # the limits for metrics form perf_events_statements
91+ # perf_events_statements_digest_text_limit = 120
92+ # perf_events_statements_limit = 250
93+ # perf_events_statements_time_limit = 86400
94+
8295 # # Some queries we may want to run less often (such as SHOW GLOBAL VARIABLES)
83- interval_slow = " 30m"
96+ # # example: interval_slow = "30m"
97+ # interval_slow = ""
8498
8599 # # Optional TLS Config (will be used if tls=custom parameter specified in server uri)
86- tls_ca = " /etc/telegraf/ca.pem"
87- tls_cert = " /etc/telegraf/cert.pem"
88- tls_key = " /etc/telegraf/key.pem"
100+ # tls_ca = "/etc/telegraf/ca.pem"
101+ # tls_cert = "/etc/telegraf/cert.pem"
102+ # tls_key = "/etc/telegraf/key.pem"
103+ # # Use TLS but skip chain & host verification
104+ # insecure_skip_verify = false
89105```
90106
91107#### Metric Version
0 commit comments