Fix #1148 - chatty MySQL
Two additional config options to reduce MySQL metrics With: - gather_table_lock_waits = false - gather_event_waits = false ``` | wc -l 34 ``` With: - gather_table_lock_waits = true - gather_event_waits = true ``` | wc -l 50040 ``` closes #1148 closes #1149
This commit is contained in:
parent
095ef04c04
commit
4c28f15b35
|
@ -879,9 +879,15 @@
|
|||
# ## gather metrics from PERFORMANCE_SCHEMA.TABLE_IO_WAITS_SUMMART_BY_TABLE
|
||||
# gather_table_io_waits = false
|
||||
# #
|
||||
# ## gather metrics from PERFORMANCE_SCHEMA.TABLE_LOCK_WAITS
|
||||
# gather_table_lock_waits = false
|
||||
# #
|
||||
# ## gather metrics from PERFORMANCE_SCHEMA.TABLE_IO_WAITS_SUMMART_BY_INDEX_USAGE
|
||||
# gather_index_io_waits = false
|
||||
# #
|
||||
# ## gather metrics from PERFORMANCE_SCHEMA.EVENT_WAITS
|
||||
# gather_event_waits = false
|
||||
# #
|
||||
# ## gather metrics from PERFORMANCE_SCHEMA.FILE_SUMMARY_BY_EVENT_NAME
|
||||
# gather_file_events_stats = false
|
||||
# #
|
||||
|
|
|
@ -56,9 +56,15 @@ This plugin gathers the statistic data from MySQL server
|
|||
## gather metrics from PERFORMANCE_SCHEMA.TABLE_IO_WAITS_SUMMART_BY_TABLE
|
||||
gather_table_io_waits = false
|
||||
#
|
||||
## gather metrics from PERFORMANCE_SCHEMA.TABLE_LOCK_WAITS
|
||||
gather_table_lock_waits = false
|
||||
#
|
||||
## gather metrics from PERFORMANCE_SCHEMA.TABLE_IO_WAITS_SUMMART_BY_INDEX_USAGE
|
||||
gather_index_io_waits = false
|
||||
#
|
||||
## gather metrics from PERFORMANCE_SCHEMA.EVENT_WAITS
|
||||
gather_event_waits = false
|
||||
#
|
||||
## gather metrics from PERFORMANCE_SCHEMA.FILE_SUMMARY_BY_EVENT_NAME
|
||||
gather_file_events_stats = false
|
||||
#
|
||||
|
|
|
@ -25,7 +25,9 @@ type Mysql struct {
|
|||
GatherSlaveStatus bool `toml:"gather_slave_status"`
|
||||
GatherBinaryLogs bool `toml:"gather_binary_logs"`
|
||||
GatherTableIOWaits bool `toml:"gather_table_io_waits"`
|
||||
GatherTableLockWaits bool `toml:"gather_table_lock_waits"`
|
||||
GatherIndexIOWaits bool `toml:"gather_index_io_waits"`
|
||||
GatherEventWaits bool `toml:"gather_event_waits"`
|
||||
GatherTableSchema bool `toml:"gather_table_schema"`
|
||||
GatherFileEventsStats bool `toml:"gather_file_events_stats"`
|
||||
GatherPerfEventsStatements bool `toml:"gather_perf_events_statements"`
|
||||
|
@ -68,9 +70,15 @@ var sampleConfig = `
|
|||
## gather metrics from PERFORMANCE_SCHEMA.TABLE_IO_WAITS_SUMMART_BY_TABLE
|
||||
gather_table_io_waits = false
|
||||
#
|
||||
## gather metrics from PERFORMANCE_SCHEMA.TABLE_LOCK_WAITS
|
||||
gather_table_lock_waits = false
|
||||
#
|
||||
## gather metrics from PERFORMANCE_SCHEMA.TABLE_IO_WAITS_SUMMART_BY_INDEX_USAGE
|
||||
gather_index_io_waits = false
|
||||
#
|
||||
## gather metrics from PERFORMANCE_SCHEMA.EVENT_WAITS
|
||||
gather_event_waits = false
|
||||
#
|
||||
## gather metrics from PERFORMANCE_SCHEMA.FILE_SUMMARY_BY_EVENT_NAME
|
||||
gather_file_events_stats = false
|
||||
#
|
||||
|
@ -612,15 +620,19 @@ func (m *Mysql) gatherServer(serv string, acc telegraf.Accumulator) error {
|
|||
}
|
||||
}
|
||||
|
||||
if m.GatherTableLockWaits {
|
||||
err = m.gatherPerfTableLockWaits(db, serv, acc)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if m.GatherEventWaits {
|
||||
err = m.gatherPerfEventWaits(db, serv, acc)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if m.GatherFileEventsStats {
|
||||
err = m.gatherPerfFileEventsStatuses(db, serv, acc)
|
||||
|
|
Loading…
Reference in New Issue