@cryptotaxi247 / netdata-1 / commits / 8a102a42c

improvement(go.d/mysql): Measure redo log occupancy (#21153)

Co-authored-by: Ilya Mashchenko <ilya@netdata.cloud> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Petr Vaněk committed Oct 24, 2025 at 16:13 UTC 8a102a42ca492b4f6e84801b06622a117461e704
17 files changed +953 -100
src/go/plugin/go.d/collector/mysql/charts.go
+39
@@ -101,7 +101,10 @@ var baseCharts = module.Charts{
101 chartInnoDBIO.Copy(),
102 chartInnoDBIOOperations.Copy(),
103 chartInnoDBPendingIOOperations.Copy(),
104 + chartInnoDBLogActivity.Copy(),
105 + chartInnoDBLogOccupancy.Copy(),
106 chartInnoDBLogOperations.Copy(),
107 + chartInnoDBCheckpointAge.Copy(),
108 chartInnoDBCurrentRowLocks.Copy(),
109 chartInnoDBRowsOperations.Copy(),
110 chartInnoDBBufferPoolPages.Copy(),
@@ -351,6 +354,19 @@ var (
354 {ID: "innodb_data_pending_fsyncs", Name: "fsyncs"},
355 },
356 }
357 + chartInnoDBLogActivity = module.Chart{
358 + ID: "innodb_redo_log_activity",
359 + Title: "InnoDB Redo Log Activity",
360 + Units: "B/s",
361 + Fam: "innodb",
362 + Ctx: "mysql.innodb_redo_log_activity",
363 + Type: module.Line,
364 + Priority: prioInnoDBLog,
365 + Dims: module.Dims{
366 + {ID: "innodb_log_sequence_number", Name: "redo_written", Algo: module.Incremental},
367 + {ID: "innodb_last_checkpoint_at", Name: "checkpointed", Algo: module.Incremental},
368 + },
369 + }
370 chartInnoDBLogOperations = module.Chart{
371 ID: "innodb_log",
372 Title: "InnoDB Log Operations",
@@ -364,6 +380,29 @@ var (
380 {ID: "innodb_log_writes", Name: "writes", Algo: module.Incremental, Mul: -1},
381 },
382 }
383 + chartInnoDBLogOccupancy = module.Chart{
384 + ID: "innodb_redo_log_occupancy",
385 + Title: "InnoDB Redo Log Occupancy",
386 + Units: "percentage",
387 + Fam: "innodb",
388 + Ctx: "mysql.innodb_redo_log_occupancy",
389 + Type: module.Area,
390 + Priority: prioInnoDBLog,
391 + Dims: module.Dims{
392 + {ID: "innodb_log_occupancy", Name: "occupancy", Algo: module.Absolute, Div: 1000},
393 + },
394 + }
395 + chartInnoDBCheckpointAge = module.Chart{
396 + ID: "innodb_redo_log_checkpoint_age",
397 + Title: "InnoDB Redo Log Checkpoint Age",
398 + Units: "B",
399 + Fam: "innodb",
400 + Ctx: "mysql.innodb_redo_log_checkpoint_age",
401 + Priority: prioInnoDBLog,
402 + Dims: module.Dims{
403 + {ID: "innodb_checkpoint_age", Name: "age", Algo: module.Absolute},
404 + },
405 + }
406 chartInnoDBCurrentRowLocks = module.Chart{
407 ID: "innodb_cur_row_lock",
408 Title: "InnoDB Current Row Locks",
src/go/plugin/go.d/collector/mysql/collect.go
+13
@@ -36,6 +36,10 @@ func (c *Collector) collect() (map[string]int64, error) {
36 return nil, fmt.Errorf("error on collecting global status: %v", err)
37 }
38
39 + if err := c.collectEngineInnoDBStatus(mx); err != nil {
40 + return nil, fmt.Errorf("error on collecting engine innodb status: %v", err)
41 + }
42 +
43 if hasInnodbOSLog(mx) {
44 c.addInnoDBOSLogOnce.Do(c.addInnoDBOSLogCharts)
45 } else if hasInnodbOSLogIO(mx) {
@@ -63,6 +67,15 @@ func (c *Collector) collect() (map[string]int64, error) {
67 }
68 c.recheckGlobalVarsTime = now
69 }
70 + mx["innodb_log_file_size"] = c.varInnoDBLogFileSize
71 + mx["innodb_log_files_in_group"] = c.varInnoDBLogFilesInGroup
72 + mx["innodb_log_group_capacity"] = c.varInnoDBLogFileSize * c.varInnoDBLogFilesInGroup
73 + // https://mariadb.com/docs/server/server-usage/storage-engines/innodb/innodb-redo-log#determining-the-redo-log-occupancy
74 + if mx["innodb_log_group_capacity"] > 0 {
75 + mx["innodb_log_occupancy"] = 100 * 1000 * mx["innodb_checkpoint_age"] / mx["innodb_log_group_capacity"]
76 + } else {
77 + mx["innodb_log_occupancy"] = 0
78 + }
79 mx["max_connections"] = c.varMaxConns
80 mx["table_open_cache"] = c.varTableOpenCache
81
src/go/plugin/go.d/collector/mysql/collect_engine_innodb_status.go new
+38
@@ -0,0 +1,38 @@
1 +// SPDX-License-Identifier: GPL-3.0-or-later
2 +
3 +package mysql
4 +
5 +import (
6 + "bufio"
7 + "strings"
8 +)
9 +
10 +const queryShowEngineInnoDBStatus = "SHOW ENGINE INNODB STATUS;"
11 +
12 +// collect Checkpoint Age in InnoDB with respect to
13 +// https://mariadb.com/kb/en/innodb-redo-log/#determining-the-checkpoint-age
14 +func (c *Collector) collectEngineInnoDBStatus(mx map[string]int64) error {
15 + q := queryShowEngineInnoDBStatus
16 + c.Debugf("executing query: '%s'", q)
17 +
18 + _, err := c.collectQuery(q, func(column, value string, _ bool) {
19 + switch column {
20 + case "Status":
21 + scanner := bufio.NewScanner(strings.NewReader(value))
22 +
23 + for scanner.Scan() {
24 + line := scanner.Text()
25 + switch {
26 + case strings.HasPrefix(line, "Log sequence number"):
27 + value := strings.TrimSpace(strings.TrimPrefix(line, "Log sequence number"))
28 + mx["innodb_log_sequence_number"] = parseInt(value)
29 + case strings.HasPrefix(line, "Last checkpoint at"):
30 + value := strings.TrimSpace(strings.TrimPrefix(line, "Last checkpoint at"))
31 + mx["innodb_last_checkpoint_at"] = parseInt(value)
32 + }
33 + }
34 + }
35 + })
36 + mx["innodb_checkpoint_age"] = mx["innodb_log_sequence_number"] - mx["innodb_last_checkpoint_at"]
37 + return err
38 +}
src/go/plugin/go.d/collector/mysql/collect_global_vars.go
+6
@@ -10,6 +10,8 @@ WHERE
10 OR Variable_name LIKE 'table_open_cache'
11 OR Variable_name LIKE 'disabled_storage_engines'
12 OR Variable_name LIKE 'log_bin'
13 + OR Variable_name LIKE 'innodb_log_file_size'
14 + OR Variable_name LIKE 'innodb_log_files_in_group'
15 OR Variable_name LIKE 'performance_schema';`
16 )
17
@@ -28,6 +30,10 @@ func (c *Collector) collectGlobalVariables() error {
30 switch name {
31 case "disabled_storage_engines":
32 c.varDisabledStorageEngine = value
33 + case "innodb_log_file_size":
34 + c.varInnoDBLogFileSize = parseInt(value)
35 + case "innodb_log_files_in_group":
36 + c.varInnoDBLogFilesInGroup = parseInt(value)
37 case "log_bin":
38 c.varLogBin = value
39 case "max_connections":
src/go/plugin/go.d/collector/mysql/collector.go
+7
@@ -52,6 +52,11 @@ func New() *Collector {
52 collectedUsers: make(map[string]bool),
53
54 recheckGlobalVarsEvery: time.Minute * 10,
55 +
56 + // innodb_log_files_in_group is available in mysql and <mariadb-10.6,
57 + // otherwise it defaults to 1.
58 + // see https://mariadb.com/kb/en/innodb-system-variables/#innodb_log_files_in_group
59 + varInnoDBLogFilesInGroup: 1,
60 }
61 }
62
@@ -93,6 +98,8 @@ type Collector struct {
98
99 recheckGlobalVarsTime time.Time
100 recheckGlobalVarsEvery time.Duration
101 + varInnoDBLogFileSize int64
102 + varInnoDBLogFilesInGroup int64
103 varMaxConns int64
104 varTableOpenCache int64
105 varDisabledStorageEngine string
src/go/plugin/go.d/collector/mysql/collector_test.go
+250 -59
@@ -32,17 +32,20 @@ var (
32 dataMySQLVer8030GlobalVariables, _ = os.ReadFile("testdata/mysql/v8.0.30/global_variables.txt")
33 dataMySQLVer8030ReplicaStatusMultiSource, _ = os.ReadFile("testdata/mysql/v8.0.30/replica_status_multi_source.txt")
34 dataMySQLVer8030ProcessList, _ = os.ReadFile("testdata/mysql/v8.0.30/process_list.txt")
35 + dataMySQLVer8030EngineInnoDBStatus, _ = os.ReadFile("testdata/mysql/v8.0.30/engine_innodb_status.txt")
36
36 - dataPerconaVer8029Version, _ = os.ReadFile("testdata/percona/v8.0.29/version.txt")
37 - dataPerconaVer8029GlobalStatus, _ = os.ReadFile("testdata/percona/v8.0.29/global_status.txt")
38 - dataPerconaVer8029GlobalVariables, _ = os.ReadFile("testdata/percona/v8.0.29/global_variables.txt")
39 - dataPerconaVer8029UserStatistics, _ = os.ReadFile("testdata/percona/v8.0.29/user_statistics.txt")
40 - dataPerconaV8029ProcessList, _ = os.ReadFile("testdata/percona/v8.0.29/process_list.txt")
37 + dataPerconaVer8029Version, _ = os.ReadFile("testdata/percona/v8.0.29/version.txt")
38 + dataPerconaVer8029GlobalStatus, _ = os.ReadFile("testdata/percona/v8.0.29/global_status.txt")
39 + dataPerconaVer8029GlobalVariables, _ = os.ReadFile("testdata/percona/v8.0.29/global_variables.txt")
40 + dataPerconaVer8029UserStatistics, _ = os.ReadFile("testdata/percona/v8.0.29/user_statistics.txt")
41 + dataPerconaVer8029ProcessList, _ = os.ReadFile("testdata/percona/v8.0.29/process_list.txt")
42 + dataPerconaVer8029EngineInnoDBStatus, _ = os.ReadFile("testdata/percona/v8.0.29/engine_innodb_status.txt")
43
42 - dataMariaVer5564Version, _ = os.ReadFile("testdata/mariadb/v5.5.64/version.txt")
43 - dataMariaVer5564GlobalStatus, _ = os.ReadFile("testdata/mariadb/v5.5.64/global_status.txt")
44 - dataMariaVer5564GlobalVariables, _ = os.ReadFile("testdata/mariadb/v5.5.64/global_variables.txt")
45 - dataMariaVer5564ProcessList, _ = os.ReadFile("testdata/mariadb/v5.5.64/process_list.txt")
44 + dataMariaVer5564Version, _ = os.ReadFile("testdata/mariadb/v5.5.64/version.txt")
45 + dataMariaVer5564GlobalStatus, _ = os.ReadFile("testdata/mariadb/v5.5.64/global_status.txt")
46 + dataMariaVer5564GlobalVariables, _ = os.ReadFile("testdata/mariadb/v5.5.64/global_variables.txt")
47 + dataMariaVer5564ProcessList, _ = os.ReadFile("testdata/mariadb/v5.5.64/process_list.txt")
48 + dataMariaVer5564EngineInnoDBStatus, _ = os.ReadFile("testdata/mariadb/v5.5.64/engine_innodb_status.txt")
49
50 dataMariaVer1084Version, _ = os.ReadFile("testdata/mariadb/v10.8.4/version.txt")
51 dataMariaVer1084GlobalStatus, _ = os.ReadFile("testdata/mariadb/v10.8.4/global_status.txt")
@@ -51,12 +54,14 @@ var (
54 dataMariaVer1084AllSlavesStatusMultiSource, _ = os.ReadFile("testdata/mariadb/v10.8.4/all_slaves_status_multi_source.txt")
55 dataMariaVer1084UserStatistics, _ = os.ReadFile("testdata/mariadb/v10.8.4/user_statistics.txt")
56 dataMariaVer1084ProcessList, _ = os.ReadFile("testdata/mariadb/v10.8.4/process_list.txt")
57 + dataMariaVer1084EngineInnoDBStatus, _ = os.ReadFile("testdata/mariadb/v10.8.4/engine_innodb_status.txt")
58
55 - dataMariaGaleraClusterVer1084Version, _ = os.ReadFile("testdata/mariadb/v10.8.4-galera-cluster/version.txt")
56 - dataMariaGaleraClusterVer1084GlobalStatus, _ = os.ReadFile("testdata/mariadb/v10.8.4-galera-cluster/global_status.txt")
57 - dataMariaGaleraClusterVer1084GlobalVariables, _ = os.ReadFile("testdata/mariadb/v10.8.4-galera-cluster/global_variables.txt")
58 - dataMariaGaleraClusterVer1084UserStatistics, _ = os.ReadFile("testdata/mariadb/v10.8.4-galera-cluster/user_statistics.txt")
59 - dataMariaGaleraClusterVer1084ProcessList, _ = os.ReadFile("testdata/mariadb/v10.8.4-galera-cluster/process_list.txt")
59 + dataMariaGaleraClusterVer1084Version, _ = os.ReadFile("testdata/mariadb/v10.8.4-galera-cluster/version.txt")
60 + dataMariaGaleraClusterVer1084GlobalStatus, _ = os.ReadFile("testdata/mariadb/v10.8.4-galera-cluster/global_status.txt")
61 + dataMariaGaleraClusterVer1084GlobalVariables, _ = os.ReadFile("testdata/mariadb/v10.8.4-galera-cluster/global_variables.txt")
62 + dataMariaGaleraClusterVer1084UserStatistics, _ = os.ReadFile("testdata/mariadb/v10.8.4-galera-cluster/user_statistics.txt")
63 + dataMariaGaleraClusterVer1084ProcessList, _ = os.ReadFile("testdata/mariadb/v10.8.4-galera-cluster/process_list.txt")
64 + dataMariaGaleraClusterVer1084EngineInnoDBStatus, _ = os.ReadFile("testdata/mariadb/v10.8.4-galera-cluster/engine_innodb_status.txt")
65
66 dataMariaVer1145Version, _ = os.ReadFile("testdata/mariadb/v11.4.5/version.txt")
67 dataMariaVer1145UserStatistics, _ = os.ReadFile("testdata/mariadb/v11.4.5/user_statistics.txt")
@@ -64,37 +69,42 @@ var (
69
70 func Test_testDataIsValid(t *testing.T) {
71 for name, data := range map[string][]byte{
67 - "dataConfigJSON": dataConfigJSON,
68 - "dataConfigYAML": dataConfigYAML,
69 - "dataSessionVariables": dataSessionVariables,
70 - "dataMySQLVer8030Version": dataMySQLVer8030Version,
71 - "dataMySQLVer8030GlobalStatus": dataMySQLVer8030GlobalStatus,
72 - "dataMySQLVer8030GlobalVariables": dataMySQLVer8030GlobalVariables,
73 - "dataMySQLVer8030ReplicaStatusMultiSource": dataMySQLVer8030ReplicaStatusMultiSource,
74 - "dataMySQLVer8030ProcessList": dataMySQLVer8030ProcessList,
75 - "dataPerconaVer8029Version": dataPerconaVer8029Version,
76 - "dataPerconaVer8029GlobalStatus": dataPerconaVer8029GlobalStatus,
77 - "dataPerconaVer8029GlobalVariables": dataPerconaVer8029GlobalVariables,
78 - "dataPerconaVer8029UserStatistics": dataPerconaVer8029UserStatistics,
79 - "dataPerconaV8029ProcessList": dataPerconaV8029ProcessList,
80 - "dataMariaVer5564Version": dataMariaVer5564Version,
81 - "dataMariaVer5564GlobalStatus": dataMariaVer5564GlobalStatus,
82 - "dataMariaVer5564GlobalVariables": dataMariaVer5564GlobalVariables,
83 - "dataMariaVer5564ProcessList": dataMariaVer5564ProcessList,
84 - "dataMariaVer1084Version": dataMariaVer1084Version,
85 - "dataMariaVer1084GlobalStatus": dataMariaVer1084GlobalStatus,
86 - "dataMariaVer1084GlobalVariables": dataMariaVer1084GlobalVariables,
87 - "dataMariaVer1084AllSlavesStatusSingleSource": dataMariaVer1084AllSlavesStatusSingleSource,
88 - "dataMariaVer1084AllSlavesStatusMultiSource": dataMariaVer1084AllSlavesStatusMultiSource,
89 - "dataMariaVer1084UserStatistics": dataMariaVer1084UserStatistics,
90 - "dataMariaVer1084ProcessList": dataMariaVer1084ProcessList,
91 - "dataMariaGaleraClusterVer1084Version": dataMariaGaleraClusterVer1084Version,
92 - "dataMariaGaleraClusterVer1084GlobalStatus": dataMariaGaleraClusterVer1084GlobalStatus,
93 - "dataMariaGaleraClusterVer1084GlobalVariables": dataMariaGaleraClusterVer1084GlobalVariables,
94 - "dataMariaGaleraClusterVer1084UserStatistics": dataMariaGaleraClusterVer1084UserStatistics,
95 - "dataMariaGaleraClusterVer1084ProcessList": dataMariaGaleraClusterVer1084ProcessList,
96 - "dataMariaVer1145Version": dataMariaVer1145Version,
97 - "dataMariaVer1145UserStatistics": dataMariaVer1145UserStatistics,
72 + "dataConfigJSON": dataConfigJSON,
73 + "dataConfigYAML": dataConfigYAML,
74 + "dataSessionVariables": dataSessionVariables,
75 + "dataMySQLVer8030Version": dataMySQLVer8030Version,
76 + "dataMySQLVer8030GlobalStatus": dataMySQLVer8030GlobalStatus,
77 + "dataMySQLVer8030GlobalVariables": dataMySQLVer8030GlobalVariables,
78 + "dataMySQLVer8030ReplicaStatusMultiSource": dataMySQLVer8030ReplicaStatusMultiSource,
79 + "dataMySQLVer8030ProcessList": dataMySQLVer8030ProcessList,
80 + "dataMySQLVer8030EngineInnoDBStatus": dataMySQLVer8030EngineInnoDBStatus,
81 + "dataPerconaVer8029Version": dataPerconaVer8029Version,
82 + "dataPerconaVer8029GlobalStatus": dataPerconaVer8029GlobalStatus,
83 + "dataPerconaVer8029GlobalVariables": dataPerconaVer8029GlobalVariables,
84 + "dataPerconaVer8029UserStatistics": dataPerconaVer8029UserStatistics,
85 + "dataPerconaVer8029ProcessList": dataPerconaVer8029ProcessList,
86 + "dataPerconaVer8029EngineInnoDBStatus": dataPerconaVer8029EngineInnoDBStatus,
87 + "dataMariaVer5564Version": dataMariaVer5564Version,
88 + "dataMariaVer5564GlobalStatus": dataMariaVer5564GlobalStatus,
89 + "dataMariaVer5564GlobalVariables": dataMariaVer5564GlobalVariables,
90 + "dataMariaVer5564ProcessList": dataMariaVer5564ProcessList,
91 + "dataMariaVer5564EngineInnoDBStatus": dataMariaVer5564EngineInnoDBStatus,
92 + "dataMariaVer1084Version": dataMariaVer1084Version,
93 + "dataMariaVer1084GlobalStatus": dataMariaVer1084GlobalStatus,
94 + "dataMariaVer1084GlobalVariables": dataMariaVer1084GlobalVariables,
95 + "dataMariaVer1084AllSlavesStatusSingleSource": dataMariaVer1084AllSlavesStatusSingleSource,
96 + "dataMariaVer1084AllSlavesStatusMultiSource": dataMariaVer1084AllSlavesStatusMultiSource,
97 + "dataMariaVer1084UserStatistics": dataMariaVer1084UserStatistics,
98 + "dataMariaVer1084ProcessList": dataMariaVer1084ProcessList,
99 + "dataMariaVer1084EngineInnoDBStatus": dataMariaVer1084EngineInnoDBStatus,
100 + "dataMariaGaleraClusterVer1084Version": dataMariaGaleraClusterVer1084Version,
101 + "dataMariaGaleraClusterVer1084GlobalStatus": dataMariaGaleraClusterVer1084GlobalStatus,
102 + "dataMariaGaleraClusterVer1084GlobalVariables": dataMariaGaleraClusterVer1084GlobalVariables,
103 + "dataMariaGaleraClusterVer1084UserStatistics": dataMariaGaleraClusterVer1084UserStatistics,
104 + "dataMariaGaleraClusterVer1084ProcessList": dataMariaGaleraClusterVer1084ProcessList,
105 + "dataMariaGaleraClusterVer1084EngineInnoDBStatus": dataMariaGaleraClusterVer1084EngineInnoDBStatus,
106 + "dataMariaVer1145Version": dataMariaVer1145Version,
107 + "dataMariaVer1145UserStatistics": dataMariaVer1145UserStatistics,
108 } {
109 require.NotNil(t, data, fmt.Sprintf("read data: %s", name))
110 _, err := prepareMockRows(data)
@@ -177,6 +187,7 @@ func TestCollector_Check(t *testing.T) {
187 mockExpect(t, m, queryDisableSessionQueryLog, nil)
188 mockExpect(t, m, queryDisableSessionSlowQueryLog, nil)
189 mockExpect(t, m, queryShowGlobalStatus, dataMariaVer1084GlobalStatus)
190 + mockExpect(t, m, queryShowEngineInnoDBStatus, dataMariaVer1084EngineInnoDBStatus)
191 mockExpect(t, m, queryShowGlobalVariables, dataMariaVer1084GlobalVariables)
192 mockExpect(t, m, queryShowAllSlavesStatus, dataMariaVer1084AllSlavesStatusMultiSource)
193 mockExpect(t, m, queryShowUserStatistics, dataMariaVer1084UserStatistics)
@@ -217,6 +228,7 @@ func TestCollector_Check(t *testing.T) {
228 mockExpect(t, m, queryDisableSessionQueryLog, nil)
229 mockExpect(t, m, queryDisableSessionSlowQueryLog, nil)
230 mockExpect(t, m, queryShowGlobalStatus, dataMariaVer1084GlobalStatus)
231 + mockExpect(t, m, queryShowEngineInnoDBStatus, dataMariaVer1084EngineInnoDBStatus)
232 mockExpect(t, m, queryShowGlobalVariables, dataMariaVer1084GlobalVariables)
233 mockExpectErr(m, queryShowAllSlavesStatus)
234 mockExpect(t, m, queryShowUserStatistics, dataMariaVer1084UserStatistics)
@@ -231,6 +243,7 @@ func TestCollector_Check(t *testing.T) {
243 mockExpect(t, m, queryDisableSessionQueryLog, nil)
244 mockExpect(t, m, queryDisableSessionSlowQueryLog, nil)
245 mockExpect(t, m, queryShowGlobalStatus, dataMariaVer1084GlobalStatus)
246 + mockExpect(t, m, queryShowEngineInnoDBStatus, dataMariaVer1084EngineInnoDBStatus)
247 mockExpect(t, m, queryShowGlobalVariables, dataMariaVer1084GlobalVariables)
248 mockExpect(t, m, queryShowAllSlavesStatus, dataMariaVer1084AllSlavesStatusMultiSource)
249 mockExpectErr(m, queryShowUserStatistics)
@@ -245,6 +258,7 @@ func TestCollector_Check(t *testing.T) {
258 mockExpect(t, m, queryDisableSessionQueryLog, nil)
259 mockExpect(t, m, queryDisableSessionSlowQueryLog, nil)
260 mockExpect(t, m, queryShowGlobalStatus, dataMariaVer1084GlobalStatus)
261 + mockExpect(t, m, queryShowEngineInnoDBStatus, dataMariaVer1084EngineInnoDBStatus)
262 mockExpect(t, m, queryShowGlobalVariables, dataMariaVer1084GlobalVariables)
263 mockExpect(t, m, queryShowAllSlavesStatus, dataMariaVer1084AllSlavesStatusMultiSource)
264 mockExpect(t, m, queryShowUserStatistics, dataMariaVer1084UserStatistics)
@@ -291,6 +305,7 @@ func TestCollector_Collect(t *testing.T) {
305 mockExpect(t, m, queryDisableSessionQueryLog, nil)
306 mockExpect(t, m, queryDisableSessionSlowQueryLog, nil)
307 mockExpect(t, m, queryShowGlobalStatus, dataMariaVer1084GlobalStatus)
308 + mockExpect(t, m, queryShowEngineInnoDBStatus, dataMariaVer1084EngineInnoDBStatus)
309 mockExpect(t, m, queryShowGlobalVariables, dataMariaVer1084GlobalVariables)
310 mockExpect(t, m, queryShowAllSlavesStatus, nil)
311 mockExpect(t, m, queryShowUserStatistics, dataMariaVer1145UserStatistics)
@@ -351,6 +366,7 @@ func TestCollector_Collect(t *testing.T) {
366 "innodb_buffer_pool_reads": 171,
367 "innodb_buffer_pool_wait_free": 0,
368 "innodb_buffer_pool_write_requests": 148,
369 + "innodb_checkpoint_age": 184,
370 "innodb_data_fsyncs": 17,
371 "innodb_data_pending_fsyncs": 0,
372 "innodb_data_pending_reads": 0,
@@ -360,6 +376,12 @@ func TestCollector_Collect(t *testing.T) {
376 "innodb_data_writes": 16,
377 "innodb_data_written": 0,
378 "innodb_deadlocks": 0,
379 + "innodb_last_checkpoint_at": 46601,
380 + "innodb_log_file_size": 100663296,
381 + "innodb_log_files_in_group": 1,
382 + "innodb_log_group_capacity": 100663296,
383 + "innodb_log_occupancy": 0,
384 + "innodb_log_sequence_number": 46785,
385 "innodb_log_waits": 0,
386 "innodb_log_write_requests": 109,
387 "innodb_log_writes": 15,
@@ -472,6 +494,7 @@ func TestCollector_Collect(t *testing.T) {
494 mockExpect(t, m, queryDisableSessionQueryLog, nil)
495 mockExpect(t, m, queryDisableSessionSlowQueryLog, nil)
496 mockExpect(t, m, queryShowGlobalStatus, dataMariaVer5564GlobalStatus)
497 + mockExpect(t, m, queryShowEngineInnoDBStatus, dataMariaVer5564EngineInnoDBStatus)
498 mockExpect(t, m, queryShowGlobalVariables, dataMariaVer5564GlobalVariables)
499 mockExpect(t, m, queryShowSlaveStatus, nil)
500 mockExpect(t, m, queryShowProcessList, dataMariaVer5564ProcessList)
@@ -525,6 +548,7 @@ func TestCollector_Collect(t *testing.T) {
548 "innodb_buffer_pool_reads": 144,
549 "innodb_buffer_pool_wait_free": 0,
550 "innodb_buffer_pool_write_requests": 0,
551 + "innodb_checkpoint_age": 0,
552 "innodb_data_fsyncs": 3,
553 "innodb_data_pending_fsyncs": 0,
554 "innodb_data_pending_reads": 0,
@@ -534,6 +558,12 @@ func TestCollector_Collect(t *testing.T) {
558 "innodb_data_writes": 3,
559 "innodb_data_written": 1536,
560 "innodb_deadlocks": 0,
561 + "innodb_last_checkpoint_at": 1597945,
562 + "innodb_log_file_size": 5242880,
563 + "innodb_log_files_in_group": 2,
564 + "innodb_log_group_capacity": 10485760,
565 + "innodb_log_occupancy": 0,
566 + "innodb_log_sequence_number": 1597945,
567 "innodb_log_waits": 0,
568 "innodb_log_write_requests": 0,
569 "innodb_log_writes": 1,
@@ -606,6 +636,7 @@ func TestCollector_Collect(t *testing.T) {
636 mockExpect(t, m, queryDisableSessionQueryLog, nil)
637 mockExpect(t, m, queryDisableSessionSlowQueryLog, nil)
638 mockExpect(t, m, queryShowGlobalStatus, dataMariaVer1084GlobalStatus)
639 + mockExpect(t, m, queryShowEngineInnoDBStatus, dataMariaVer1084EngineInnoDBStatus)
640 mockExpect(t, m, queryShowGlobalVariables, dataMariaVer1084GlobalVariables)
641 mockExpect(t, m, queryShowAllSlavesStatus, nil)
642 mockExpect(t, m, queryShowUserStatistics, dataMariaVer1084UserStatistics)
@@ -667,6 +698,7 @@ func TestCollector_Collect(t *testing.T) {
698 "innodb_buffer_pool_reads": 171,
699 "innodb_buffer_pool_wait_free": 0,
700 "innodb_buffer_pool_write_requests": 148,
701 + "innodb_checkpoint_age": 184,
702 "innodb_data_fsyncs": 17,
703 "innodb_data_pending_fsyncs": 0,
704 "innodb_data_pending_reads": 0,
@@ -676,6 +708,12 @@ func TestCollector_Collect(t *testing.T) {
708 "innodb_data_writes": 16,
709 "innodb_data_written": 0,
710 "innodb_deadlocks": 0,
711 + "innodb_last_checkpoint_at": 46601,
712 + "innodb_log_file_size": 100663296,
713 + "innodb_log_files_in_group": 1,
714 + "innodb_log_group_capacity": 100663296,
715 + "innodb_log_occupancy": 0,
716 + "innodb_log_sequence_number": 46785,
717 "innodb_log_waits": 0,
718 "innodb_log_write_requests": 109,
719 "innodb_log_writes": 15,
@@ -788,6 +826,7 @@ func TestCollector_Collect(t *testing.T) {
826 mockExpect(t, m, queryDisableSessionQueryLog, nil)
827 mockExpect(t, m, queryDisableSessionSlowQueryLog, nil)
828 mockExpect(t, m, queryShowGlobalStatus, dataMariaVer1084GlobalStatus)
829 + mockExpect(t, m, queryShowEngineInnoDBStatus, dataMariaVer1084EngineInnoDBStatus)
830 mockExpect(t, m, queryShowGlobalVariables, dataMariaVer1084GlobalVariables)
831 mockExpect(t, m, queryShowAllSlavesStatus, dataMariaVer1084AllSlavesStatusSingleSource)
832 mockExpect(t, m, queryShowUserStatistics, dataMariaVer1084UserStatistics)
@@ -848,6 +887,7 @@ func TestCollector_Collect(t *testing.T) {
887 "innodb_buffer_pool_reads": 171,
888 "innodb_buffer_pool_wait_free": 0,
889 "innodb_buffer_pool_write_requests": 148,
890 + "innodb_checkpoint_age": 184,
891 "innodb_data_fsyncs": 17,
892 "innodb_data_pending_fsyncs": 0,
893 "innodb_data_pending_reads": 0,
@@ -857,6 +897,12 @@ func TestCollector_Collect(t *testing.T) {
897 "innodb_data_writes": 16,
898 "innodb_data_written": 0,
899 "innodb_deadlocks": 0,
900 + "innodb_last_checkpoint_at": 46601,
901 + "innodb_log_file_size": 100663296,
902 + "innodb_log_files_in_group": 1,
903 + "innodb_log_group_capacity": 100663296,
904 + "innodb_log_occupancy": 0,
905 + "innodb_log_sequence_number": 46785,
906 "innodb_log_waits": 0,
907 "innodb_log_write_requests": 109,
908 "innodb_log_writes": 15,
@@ -972,6 +1018,7 @@ func TestCollector_Collect(t *testing.T) {
1018 mockExpect(t, m, queryDisableSessionQueryLog, nil)
1019 mockExpect(t, m, queryDisableSessionSlowQueryLog, nil)
1020 mockExpect(t, m, queryShowGlobalStatus, dataMariaVer1084GlobalStatus)
1021 + mockExpect(t, m, queryShowEngineInnoDBStatus, dataMariaVer1084EngineInnoDBStatus)
1022 mockExpect(t, m, queryShowGlobalVariables, dataMariaVer1084GlobalVariables)
1023 mockExpect(t, m, queryShowAllSlavesStatus, dataMariaVer1084AllSlavesStatusMultiSource)
1024 mockExpect(t, m, queryShowUserStatistics, dataMariaVer1084UserStatistics)
@@ -1032,6 +1079,7 @@ func TestCollector_Collect(t *testing.T) {
1079 "innodb_buffer_pool_reads": 171,
1080 "innodb_buffer_pool_wait_free": 0,
1081 "innodb_buffer_pool_write_requests": 148,
1082 + "innodb_checkpoint_age": 184,
1083 "innodb_data_fsyncs": 17,
1084 "innodb_data_pending_fsyncs": 0,
1085 "innodb_data_pending_reads": 0,
@@ -1041,6 +1089,12 @@ func TestCollector_Collect(t *testing.T) {
1089 "innodb_data_writes": 16,
1090 "innodb_data_written": 0,
1091 "innodb_deadlocks": 0,
1092 + "innodb_last_checkpoint_at": 46601,
1093 + "innodb_log_file_size": 100663296,
1094 + "innodb_log_files_in_group": 1,
1095 + "innodb_log_group_capacity": 100663296,
1096 + "innodb_log_occupancy": 0,
1097 + "innodb_log_sequence_number": 46785,
1098 "innodb_log_waits": 0,
1099 "innodb_log_write_requests": 109,
1100 "innodb_log_writes": 15,
@@ -1159,6 +1213,7 @@ func TestCollector_Collect(t *testing.T) {
1213 mockExpect(t, m, queryDisableSessionQueryLog, nil)
1214 mockExpect(t, m, queryDisableSessionSlowQueryLog, nil)
1215 mockExpect(t, m, queryShowGlobalStatus, dataMariaVer1084GlobalStatus)
1216 + mockExpect(t, m, queryShowEngineInnoDBStatus, dataMariaVer1084EngineInnoDBStatus)
1217 mockExpect(t, m, queryShowGlobalVariables, dataMariaVer1084GlobalVariables)
1218 mockExpectErr(m, queryShowAllSlavesStatus)
1219 mockExpect(t, m, queryShowUserStatistics, dataMariaVer1084UserStatistics)
@@ -1219,6 +1274,7 @@ func TestCollector_Collect(t *testing.T) {
1274 "innodb_buffer_pool_reads": 171,
1275 "innodb_buffer_pool_wait_free": 0,
1276 "innodb_buffer_pool_write_requests": 148,
1277 + "innodb_checkpoint_age": 184,
1278 "innodb_data_fsyncs": 17,
1279 "innodb_data_pending_fsyncs": 0,
1280 "innodb_data_pending_reads": 0,
@@ -1228,6 +1284,12 @@ func TestCollector_Collect(t *testing.T) {
1284 "innodb_data_writes": 16,
1285 "innodb_data_written": 0,
1286 "innodb_deadlocks": 0,
1287 + "innodb_last_checkpoint_at": 46601,
1288 + "innodb_log_file_size": 100663296,
1289 + "innodb_log_files_in_group": 1,
1290 + "innodb_log_group_capacity": 100663296,
1291 + "innodb_log_occupancy": 0,
1292 + "innodb_log_sequence_number": 46785,
1293 "innodb_log_waits": 0,
1294 "innodb_log_write_requests": 109,
1295 "innodb_log_writes": 15,
@@ -1340,6 +1402,7 @@ func TestCollector_Collect(t *testing.T) {
1402 mockExpect(t, m, queryDisableSessionQueryLog, nil)
1403 mockExpect(t, m, queryDisableSessionSlowQueryLog, nil)
1404 mockExpect(t, m, queryShowGlobalStatus, dataMariaGaleraClusterVer1084GlobalStatus)
1405 + mockExpect(t, m, queryShowEngineInnoDBStatus, dataMariaGaleraClusterVer1084EngineInnoDBStatus)
1406 mockExpect(t, m, queryShowGlobalVariables, dataMariaGaleraClusterVer1084GlobalVariables)
1407 mockExpect(t, m, queryShowAllSlavesStatus, nil)
1408 mockExpect(t, m, queryShowUserStatistics, dataMariaGaleraClusterVer1084UserStatistics)
@@ -1400,6 +1463,7 @@ func TestCollector_Collect(t *testing.T) {
1463 "innodb_buffer_pool_reads": 184,
1464 "innodb_buffer_pool_wait_free": 0,
1465 "innodb_buffer_pool_write_requests": 203,
1466 + "innodb_checkpoint_age": 6745,
1467 "innodb_data_fsyncs": 15,
1468 "innodb_data_pending_fsyncs": 0,
1469 "innodb_data_pending_reads": 0,
@@ -1409,6 +1473,12 @@ func TestCollector_Collect(t *testing.T) {
1473 "innodb_data_writes": 14,
1474 "innodb_data_written": 0,
1475 "innodb_deadlocks": 0,
1476 + "innodb_last_checkpoint_at": 46617,
1477 + "innodb_log_file_size": 100663296,
1478 + "innodb_log_files_in_group": 1,
1479 + "innodb_log_group_capacity": 100663296,
1480 + "innodb_log_occupancy": 6,
1481 + "innodb_log_sequence_number": 53362,
1482 "innodb_log_waits": 0,
1483 "innodb_log_write_requests": 65,
1484 "innodb_log_writes": 13,
@@ -1537,6 +1607,7 @@ func TestCollector_Collect(t *testing.T) {
1607 mockExpect(t, m, queryDisableSessionQueryLog, nil)
1608 mockExpect(t, m, queryDisableSessionSlowQueryLog, nil)
1609 mockExpect(t, m, queryShowGlobalStatus, dataMySQLVer8030GlobalStatus)
1610 + mockExpect(t, m, queryShowEngineInnoDBStatus, dataMySQLVer8030EngineInnoDBStatus)
1611 mockExpect(t, m, queryShowGlobalVariables, dataMySQLVer8030GlobalVariables)
1612 mockExpect(t, m, queryShowReplicaStatus, dataMySQLVer8030ReplicaStatusMultiSource)
1613 mockExpect(t, m, queryShowProcessListPS, dataMySQLVer8030ProcessList)
@@ -1596,6 +1667,7 @@ func TestCollector_Collect(t *testing.T) {
1667 "innodb_buffer_pool_reads": 878,
1668 "innodb_buffer_pool_wait_free": 0,
1669 "innodb_buffer_pool_write_requests": 2377,
1670 + "innodb_checkpoint_age": 0,
1671 "innodb_data_fsyncs": 255,
1672 "innodb_data_pending_fsyncs": 0,
1673 "innodb_data_pending_reads": 0,
@@ -1604,6 +1676,12 @@ func TestCollector_Collect(t *testing.T) {
1676 "innodb_data_reads": 899,
1677 "innodb_data_writes": 561,
1678 "innodb_data_written": 6128128,
1679 + "innodb_last_checkpoint_at": 31603995,
1680 + "innodb_log_file_size": 50331648,
1681 + "innodb_log_files_in_group": 2,
1682 + "innodb_log_group_capacity": 100663296,
1683 + "innodb_log_occupancy": 0,
1684 + "innodb_log_sequence_number": 31603995,
1685 "innodb_log_waits": 0,
1686 "innodb_log_write_requests": 1062,
1687 "innodb_log_writes": 116,
@@ -1675,10 +1753,11 @@ func TestCollector_Collect(t *testing.T) {
1753 mockExpect(t, m, queryDisableSessionQueryLog, nil)
1754 mockExpect(t, m, queryDisableSessionSlowQueryLog, nil)
1755 mockExpect(t, m, queryShowGlobalStatus, dataPerconaVer8029GlobalStatus)
1756 + mockExpect(t, m, queryShowEngineInnoDBStatus, dataPerconaVer8029EngineInnoDBStatus)
1757 mockExpect(t, m, queryShowGlobalVariables, dataPerconaVer8029GlobalVariables)
1758 mockExpect(t, m, queryShowReplicaStatus, nil)
1759 mockExpect(t, m, queryShowUserStatistics, dataPerconaVer8029UserStatistics)
1681 - mockExpect(t, m, queryShowProcessListPS, dataPerconaV8029ProcessList)
1760 + mockExpect(t, m, queryShowProcessListPS, dataPerconaVer8029ProcessList)
1761 },
1762 check: func(t *testing.T, collr *Collector) {
1763 mx := collr.Collect(context.Background())
@@ -1735,6 +1814,7 @@ func TestCollector_Collect(t *testing.T) {
1814 "innodb_buffer_pool_reads": 978,
1815 "innodb_buffer_pool_wait_free": 0,
1816 "innodb_buffer_pool_write_requests": 77412,
1817 + "innodb_checkpoint_age": 0,
1818 "innodb_data_fsyncs": 50,
1819 "innodb_data_pending_fsyncs": 0,
1820 "innodb_data_pending_reads": 0,
@@ -1743,6 +1823,12 @@ func TestCollector_Collect(t *testing.T) {
1823 "innodb_data_reads": 1002,
1824 "innodb_data_writes": 288,
1825 "innodb_data_written": 3420160,
1826 + "innodb_last_checkpoint_at": 31825026,
1827 + "innodb_log_file_size": 50331648,
1828 + "innodb_log_files_in_group": 2,
1829 + "innodb_log_group_capacity": 100663296,
1830 + "innodb_log_occupancy": 0,
1831 + "innodb_log_sequence_number": 31825026,
1832 "innodb_log_waits": 0,
1833 "innodb_log_write_requests": 651,
1834 "innodb_log_writes": 47,
@@ -1890,6 +1976,85 @@ func mockExpectErr(mock sqlmock.Sqlmock, query string) {
1976 mock.ExpectQuery(query).WillReturnError(fmt.Errorf("mock error (%s)", query))
1977 }
1978
1979 +func TestPrepareMockRows(t *testing.T) {
1980 + tests := map[string]struct {
1981 + data string
1982 + rows *sqlmock.Rows
1983 + }{
1984 + "one row": {
1985 + data: `
1986 ++------+-------+
1987 +| Name | Value |
1988 ++------+-------+
1989 +| a | 1 |
1990 ++------+-------+
1991 +`,
1992 + rows: sqlmock.NewRows([]string{"Name", "Value"}).
1993 + AddRow("a", "1"),
1994 + },
1995 + "two rows": {
1996 + data: `
1997 ++------+-------+
1998 +| Name | Value |
1999 ++------+-------+
2000 +| a | 1 |
2001 +| b | 2 |
2002 ++------+-------+
2003 +`,
2004 + rows: sqlmock.NewRows([]string{"Name", "Value"}).
2005 + AddRow("a", "1").AddRow("b", "2"),
2006 + },
2007 + "multiline text": {
2008 + data: `
2009 ++------+-------+
2010 +| Name | Value |
2011 ++------+-------+
2012 +| a | b
2013 +c d
2014 +e |
2015 ++------+-------+
2016 +`,
2017 + rows: sqlmock.NewRows([]string{"Name", "Value"}).
2018 + AddRow("a", "b\nc d\ne"),
2019 + },
2020 + "multiline text prefixed and suffixed with \\n": {
2021 + data: `
2022 ++------+-------+
2023 +| Name | Value |
2024 ++------+-------+
2025 +| a |
2026 +b c
2027 +d
2028 + |
2029 ++------+-------+
2030 +`,
2031 + rows: sqlmock.NewRows([]string{"Name", "Value"}).
2032 + AddRow("a", "\nb c\nd\n"),
2033 + },
2034 + "multiline text in the first column": {
2035 + data: `
2036 ++-------+------+
2037 +| Value | Name |
2038 ++-------+------+
2039 +| a
2040 +b c
2041 +d
2042 + | e |
2043 ++-------+------+
2044 +`,
2045 + rows: sqlmock.NewRows([]string{"Value", "Name"}).
2046 + AddRow("a\nb c\nd\n", "e"),
2047 + }}
2048 +
2049 + for name, test := range tests {
2050 + t.Run(name, func(t *testing.T) {
2051 + out, err := prepareMockRows([]byte(test.data))
2052 + assert.NoError(t, err)
2053 + assert.Equal(t, test.rows, out)
2054 + })
2055 + }
2056 +}
2057 +
2058 func prepareMockRows(data []byte) (*sqlmock.Rows, error) {
2059 if len(data) == 0 {
2060 return sqlmock.NewRows(nil), nil
@@ -1900,9 +2065,11 @@ func prepareMockRows(data []byte) (*sqlmock.Rows, error) {
2065
2066 var numColumns int
2067 var rows *sqlmock.Rows
2068 + var rowLines []string
2069
2070 for sc.Scan() {
1905 - s := strings.TrimSpace(strings.Trim(sc.Text(), "|"))
2071 + line := sc.Text()
2072 + s := strings.TrimSpace(line)
2073 switch {
2074 case s == "",
2075 strings.HasPrefix(s, "+"),
@@ -1910,26 +2077,24 @@ func prepareMockRows(data []byte) (*sqlmock.Rows, error) {
2077 continue
2078 }
2079
1913 - parts := strings.Split(s, "|")
1914 - for i, v := range parts {
1915 - parts[i] = strings.TrimSpace(v)
1916 - }
1917 -
2080 if rows == nil {
2081 + parts := splitCells(line)
2082 numColumns = len(parts)
2083 rows = sqlmock.NewRows(parts)
2084 continue
2085 }
2086
1924 - if len(parts) != numColumns {
1925 - return nil, fmt.Errorf("prepareMockRows(): columns != values (%d/%d)", numColumns, len(parts))
2087 + if strings.Count(s, "|")-1 == numColumns || (rowLines != nil && strings.HasSuffix(s, "|")) {
2088 + vals, err := buildRow(append(rowLines, line), numColumns)
2089 + if err != nil {
2090 + return nil, err
2091 + }
2092 + rows.AddRow(vals...)
2093 + rowLines = nil
2094 + continue
2095 }
2096
1928 - values := make([]driver.Value, len(parts))
1929 - for i, v := range parts {
1930 - values[i] = v
1931 - }
1932 - rows.AddRow(values...)
2097 + rowLines = append(rowLines, line)
2098 }
2099
2100 if rows == nil {
@@ -1938,3 +2103,29 @@ func prepareMockRows(data []byte) (*sqlmock.Rows, error) {
2103
2104 return rows, sc.Err()
2105 }
2106 +
2107 +func splitCells(s string) []string {
2108 + parts := strings.Split(strings.Trim(s, "|"), "|")
2109 + for i := range parts {
2110 + parts[i] = strings.TrimSpace(parts[i])
2111 + }
2112 + return parts
2113 +}
2114 +
2115 +func buildRow(lines []string, cols int) ([]driver.Value, error) {
2116 + row := strings.Join(lines, "\n")
2117 + if !strings.HasPrefix(row, "|") || !strings.HasSuffix(row, "|") {
2118 + return nil, errors.New("prepareMockRows(): malformed row")
2119 + }
2120 +
2121 + parts := strings.Split(strings.Trim(row, "|"), "|")
2122 + if len(parts) != cols {
2123 + return nil, fmt.Errorf("prepareMockRows(): columns != values (%d/%d)", cols, len(parts))
2124 + }
2125 +
2126 + vals := make([]driver.Value, cols)
2127 + for i, c := range parts {
2128 + vals[i] = strings.Trim(c, " ")
2129 + }
2130 + return vals, nil
2131 +}
src/go/plugin/go.d/collector/mysql/metadata.yaml
+20
@@ -40,6 +40,7 @@ modules:
40
41 - `SELECT VERSION();`
42 - `SHOW GLOBAL STATUS;`
43 + - `SHOW ENGINE INNODB STATUS;`
44 - `SHOW GLOBAL VARIABLES;`
45 - `SHOW SLAVE STATUS;` or `SHOW ALL SLAVES STATUS;` (MariaDBv10.2+) or `SHOW REPLICA STATUS;` (MySQL 8.0.22+)
46 - `SHOW USER_STATISTICS;` (MariaDBv10.1.1+)
@@ -391,6 +392,25 @@ modules:
392 - name: waits
393 - name: write_requests
394 - name: writes
395 + - name: mysql.innodb_redo_log_activity
396 + description: InnoDB Redo Log Activity
397 + unit: B/s
398 + chart_type: line
399 + dimensions:
400 + - name: redo_written
401 + - name: checkpointed
402 + - name: mysql.innodb_redo_log_occupancy
403 + description: InnoDB Redo Log Occupancy
404 + unit: percentage
405 + chart_type: area
406 + dimensions:
407 + - name: occupancy
408 + - name: mysql.innodb_redo_log_checkpoint_age
409 + description: InnoDB Redo Log Checkpoint Age
410 + unit: B
411 + chart_type: line
412 + dimensions:
413 + - name: age
414 - name: mysql.innodb_cur_row_lock
415 description: InnoDB Current Row Locks
416 unit: operations
src/go/plugin/go.d/collector/mysql/testdata/mariadb/v10.8.4-galera-cluster/engine_innodb_status.txt new
+83
@@ -0,0 +1,83 @@
1 ++--------+------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
2 +| Type | Name | Status |
3 ++--------+------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
4 +| InnoDB | |
5 +=====================================
6 +2025-05-22 08:08:33 0x7f7216db4640 INNODB MONITOR OUTPUT
7 +=====================================
8 +Per second averages calculated from the last 20 seconds
9 +-----------------
10 +BACKGROUND THREAD
11 +-----------------
12 +srv_master_thread loops: 0 srv_active, 0 srv_shutdown, 71583 srv_idle
13 +srv_master_thread log flush and writes: 71582
14 +----------
15 +SEMAPHORES
16 +----------
17 +------------
18 +TRANSACTIONS
19 +------------
20 +Trx id counter 26
21 +Purge done for trx's n:o < 26 undo n:o < 0 state: running but idle
22 +History list length 0
23 +LIST OF TRANSACTIONS FOR EACH SESSION:
24 +---TRANSACTION (0x7f7206000b80), not started
25 +0 lock struct(s), heap size 1128, 0 row lock(s)
26 +--------
27 +FILE I/O
28 +--------
29 +Pending flushes (fsync): 0
30 +168 OS file reads, 14 OS file writes, 17 OS fsyncs
31 +0.00 reads/s, 0 avg bytes/read, 0.00 writes/s, 0.00 fsyncs/s
32 +-------------------------------------
33 +INSERT BUFFER AND ADAPTIVE HASH INDEX
34 +-------------------------------------
35 +Ibuf: size 1, free list len 0, seg size 2, 0 merges
36 +merged operations:
37 + insert 0, delete mark 0, delete 0
38 +discarded operations:
39 + insert 0, delete mark 0, delete 0
40 +0.00 hash searches/s, 0.00 non-hash searches/s
41 +---
42 +LOG
43 +---
44 +Log sequence number 53362
45 +Log flushed up to 53362
46 +Pages flushed up to 46617
47 +Last checkpoint at 46617
48 +----------------------
49 +BUFFER POOL AND MEMORY
50 +----------------------
51 +Total large memory allocated 167772160
52 +Dictionary memory allocated 862248
53 +Buffer pool size 8064
54 +Free buffers 7765
55 +Database pages 299
56 +Old database pages 0
57 +Modified db pages 152
58 +Percent of dirty pages(LRU & free pages): 1.885
59 +Max dirty pages percent: 90.000
60 +Pending reads 0
61 +Pending writes: LRU 0, flush list 0
62 +Pages made young 0, not young 0
63 +0.00 youngs/s, 0.00 non-youngs/s
64 +Pages read 155, created 144, written 0
65 +0.00 reads/s, 0.00 creates/s, 0.00 writes/s
66 +No buffer pool page gets since the last printout
67 +Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s
68 +LRU len: 299, unzip_LRU len: 0
69 +I/O sum[0]:cur[0], unzip sum[0]:cur[0]
70 +--------------
71 +ROW OPERATIONS
72 +--------------
73 +0 read views open inside InnoDB
74 +Process ID=0, Main thread ID=0, state: sleeping
75 +Number of rows inserted 0, updated 0, deleted 0, read 0
76 +0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s
77 +Number of system rows inserted 2, updated 0, deleted 0, read 0
78 +0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s
79 +----------------------------
80 +END OF INNODB MONITOR OUTPUT
81 +============================
82 + |
83 ++--------+------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
src/go/plugin/go.d/collector/mysql/testdata/mariadb/v10.8.4-galera-cluster/global_variables.txt
+9 -8
@@ -1,8 +1,9 @@
1 -+--------------------+-------+
2 -| Variable_name | Value |
3 -+--------------------+-------+
4 -| log_bin | ON |
5 -| max_connections | 151 |
6 -| performance_schema | ON |
7 -| table_open_cache | 2000 |
8 -+--------------------+-------+
1 ++----------------------+-----------+
2 +| Variable_name | Value |
3 ++----------------------+-----------+
4 +| innodb_log_file_size | 100663296 |
5 +| log_bin | ON |
6 +| max_connections | 151 |
7 +| performance_schema | ON |
8 +| table_open_cache | 2000 |
9 ++----------------------+-----------+
src/go/plugin/go.d/collector/mysql/testdata/mariadb/v10.8.4/engine_innodb_status.txt new
+81
@@ -0,0 +1,81 @@
1 ++--------+------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
2 +| Type | Name | Status |
3 ++--------+------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
4 +| InnoDB | |
5 +=====================================
6 +2025-05-22 08:10:43 0x7fdc125ec640 INNODB MONITOR OUTPUT
7 +=====================================
8 +Per second averages calculated from the last 36 seconds
9 +-----------------
10 +BACKGROUND THREAD
11 +-----------------
12 +srv_master_thread loops: 0 srv_active, 0 srv_shutdown, 5135 srv_idle
13 +srv_master_thread log flush and writes: 5135
14 +----------
15 +SEMAPHORES
16 +----------
17 +------------
18 +TRANSACTIONS
19 +------------
20 +Trx id counter 15
21 +Purge done for trx's n:o < 13 undo n:o < 0 state: running but idle
22 +History list length 0
23 +LIST OF TRANSACTIONS FOR EACH SESSION:
24 +--------
25 +FILE I/O
26 +--------
27 +Pending flushes (fsync): 0
28 +166 OS file reads, 1 OS file writes, 2 OS fsyncs
29 +0.00 reads/s, 0 avg bytes/read, 0.00 writes/s, 0.00 fsyncs/s
30 +-------------------------------------
31 +INSERT BUFFER AND ADAPTIVE HASH INDEX
32 +-------------------------------------
33 +Ibuf: size 1, free list len 0, seg size 2, 0 merges
34 +merged operations:
35 + insert 0, delete mark 0, delete 0
36 +discarded operations:
37 + insert 0, delete mark 0, delete 0
38 +0.00 hash searches/s, 0.00 non-hash searches/s
39 +---
40 +LOG
41 +---
42 +Log sequence number 46785
43 +Log flushed up to 46785
44 +Pages flushed up to 46617
45 +Last checkpoint at 46601
46 +----------------------
47 +BUFFER POOL AND MEMORY
48 +----------------------
49 +Total large memory allocated 167772160
50 +Dictionary memory allocated 855336
51 +Buffer pool size 8064
52 +Free buffers 7780
53 +Database pages 284
54 +Old database pages 0
55 +Modified db pages 6
56 +Percent of dirty pages(LRU & free pages): 0.074
57 +Max dirty pages percent: 90.000
58 +Pending reads 0
59 +Pending writes: LRU 0, flush list 0
60 +Pages made young 0, not young 0
61 +0.00 youngs/s, 0.00 non-youngs/s
62 +Pages read 153, created 131, written 0
63 +0.00 reads/s, 0.00 creates/s, 0.00 writes/s
64 +No buffer pool page gets since the last printout
65 +Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s
66 +LRU len: 284, unzip_LRU len: 0
67 +I/O sum[0]:cur[0], unzip sum[0]:cur[0]
68 +--------------
69 +ROW OPERATIONS
70 +--------------
71 +0 read views open inside InnoDB
72 +Process ID=0, Main thread ID=0, state: sleeping
73 +Number of rows inserted 0, updated 0, deleted 0, read 0
74 +0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s
75 +Number of system rows inserted 0, updated 0, deleted 0, read 0
76 +0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s
77 +----------------------------
78 +END OF INNODB MONITOR OUTPUT
79 +============================
80 + |
81 ++--------+------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
src/go/plugin/go.d/collector/mysql/testdata/mariadb/v10.8.4/global_variables.txt
+9 -8
@@ -1,8 +1,9 @@
1 -+--------------------+-------+
2 -| Variable_name | Value |
3 -+--------------------+-------+
4 -| log_bin | ON |
5 -| max_connections | 151 |
6 -| performance_schema | ON |
7 -| table_open_cache | 2000 |
8 -+--------------------+-------+
1 ++------------------------+-----------+
2 +| Variable_name | Value |
3 ++------------------------+-----------+
4 +| innodb_log_file_size | 100663296 |
5 +| log_bin | ON |
6 +| max_connections | 151 |
7 +| performance_schema | ON |
8 +| table_open_cache | 2000 |
9 ++------------------------+-----------+
src/go/plugin/go.d/collector/mysql/testdata/mariadb/v5.5.64/engine_innodb_status.txt new
+122
@@ -0,0 +1,122 @@
1 ++--------+------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
2 +| Type | Name | Status |
3 ++--------+------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
4 +| InnoDB | |
5 +=====================================
6 +250522 8:10:54 INNODB MONITOR OUTPUT
7 +=====================================
8 +Per second averages calculated from the last 25 seconds
9 +-----------------
10 +BACKGROUND THREAD
11 +-----------------
12 +srv_master_thread loops: 1 1_second, 1 sleeps, 0 10_second, 1 background, 1 flush
13 +srv_master_thread log flush and writes: 1
14 +----------
15 +SEMAPHORES
16 +----------
17 +OS WAIT ARRAY INFO: reservation count 2, signal count 2
18 +Mutex spin waits 0, rounds 0, OS waits 0
19 +RW-shared spins 2, rounds 60, OS waits 2
20 +RW-excl spins 0, rounds 0, OS waits 0
21 +Spin rounds per wait: 0.00 mutex, 30.00 RW-shared, 0.00 RW-excl
22 +--------
23 +FILE I/O
24 +--------
25 +I/O thread 0 state: waiting for completed aio requests (insert buffer thread)
26 +I/O thread 1 state: waiting for completed aio requests (log thread)
27 +I/O thread 2 state: waiting for completed aio requests (read thread)
28 +I/O thread 3 state: waiting for completed aio requests (read thread)
29 +I/O thread 4 state: waiting for completed aio requests (read thread)
30 +I/O thread 5 state: waiting for completed aio requests (read thread)
31 +I/O thread 6 state: waiting for completed aio requests (write thread)
32 +I/O thread 7 state: waiting for completed aio requests (write thread)
33 +I/O thread 8 state: waiting for completed aio requests (write thread)
34 +I/O thread 9 state: waiting for completed aio requests (write thread)
35 +Pending normal aio reads: 0 [0, 0, 0, 0] , aio writes: 0 [0, 0, 0, 0] ,
36 + ibuf aio reads: 0, log i/o's: 0, sync i/o's: 0
37 +Pending flushes (fsync) log: 0; buffer pool: 0
38 +155 OS file reads, 3 OS file writes, 3 OS fsyncs
39 +0.00 reads/s, 0 avg bytes/read, 0.00 writes/s, 0.00 fsyncs/s
40 +-------------------------------------
41 +INSERT BUFFER AND ADAPTIVE HASH INDEX
42 +-------------------------------------
43 +Ibuf: size 1, free list len 0, seg size 2, 0 merges
44 +merged operations:
45 + insert 0, delete mark 0, delete 0
46 +discarded operations:
47 + insert 0, delete mark 0, delete 0
48 +Hash table size 553229, node heap has 0 buffer(s)
49 +0.00 hash searches/s, 0.00 non-hash searches/s
50 +---
51 +LOG
52 +---
53 +Log sequence number 1597945
54 +Log flushed up to 1597945
55 +Last checkpoint at 1597945
56 +Max checkpoint age 7782360
57 +Checkpoint age target 7539162
58 +Modified age 0
59 +Checkpoint age 0
60 +0 pending log writes, 0 pending chkp writes
61 +8 log i/o's done, 0.00 log i/o's/second
62 +----------------------
63 +BUFFER POOL AND MEMORY
64 +----------------------
65 +Total memory allocated 275513344; in additional pool allocated 0
66 +Total memory allocated by read views 88
67 +Internal hash tables (constant factor + variable factor)
68 + Adaptive hash index 4430048 (4425832 + 4216)
69 + Page hash 277432 (buffer pool 0 only)
70 + Dictionary cache 1146964 (1107952 + 39012)
71 + File system 83536 (82672 + 864)
72 + Lock system 665312 (664936 + 376)
73 + Recovery system 0 (0 + 0)
74 +Dictionary memory allocated 39012
75 +Buffer pool size 16383
76 +Buffer pool size, bytes 268419072
77 +Free buffers 16240
78 +Database pages 143
79 +Old database pages 0
80 +Modified db pages 0
81 +Pending reads 0
82 +Pending writes: LRU 0, flush list 0, single page 0
83 +Pages made young 0, not young 0
84 +0.00 youngs/s, 0.00 non-youngs/s
85 +Pages read 143, created 0, written 0
86 +0.00 reads/s, 0.00 creates/s, 0.00 writes/s
87 +No buffer pool page gets since the last printout
88 +Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s
89 +LRU len: 143, unzip_LRU len: 0
90 +I/O sum[0]:cur[0], unzip sum[0]:cur[0]
91 +--------------
92 +ROW OPERATIONS
93 +--------------
94 +0 queries inside InnoDB, 0 queries in queue
95 +1 read views open inside InnoDB
96 +0 transactions active inside InnoDB
97 +0 out of 1000 descriptors used
98 +---OLDEST VIEW---
99 +Normal read view
100 +Read view low limit trx n:o 500
101 +Read view up limit trx id 500
102 +Read view low limit trx id 500
103 +Read view individually stored trx ids:
104 +-----------------
105 +Main thread process no. 1, id 140523048273664, state: waiting for server activity
106 +Number of rows inserted 0, updated 0, deleted 0, read 0
107 +0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s
108 +------------
109 +TRANSACTIONS
110 +------------
111 +Trx id counter 500
112 +Purge done for trx's n:o < 0 undo n:o < 0
113 +History list length 0
114 +LIST OF TRANSACTIONS FOR EACH SESSION:
115 +---TRANSACTION 0, not started
116 +MySQL thread id 4, OS thread handle 0x7fce44f9f700, query id 906 localhost root
117 +SHOW ENGINE INNODB STATUS
118 +----------------------------
119 +END OF INNODB MONITOR OUTPUT
120 +============================
121 + |
122 ++--------+------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
src/go/plugin/go.d/collector/mysql/testdata/mariadb/v5.5.64/global_variables.txt
+9 -7
@@ -1,7 +1,9 @@
1 -+------------------+-------+
2 -| Variable_name | Value |
3 -+------------------+-------+
4 -| log_bin | OFF |
5 -| max_connections | 100 |
6 -| table_open_cache | 400 |
7 -+------------------+-------+
\ No newline at end of file
1 ++---------------------------+---------+
2 +| Variable_name | Value |
3 ++---------------------------+---------+
4 +| innodb_log_file_size | 5242880 |
5 +| innodb_log_files_in_group | 2 |
6 +| log_bin | OFF |
7 +| max_connections | 100 |
8 +| table_open_cache | 400 |
9 ++---------------------------+---------+
src/go/plugin/go.d/collector/mysql/testdata/mysql/v8.0.30/engine_innodb_status.txt new
+119
@@ -0,0 +1,119 @@
1 ++--------+------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
2 +| Type | Name | Status |
3 ++--------+------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
4 +| InnoDB | |
5 +=====================================
6 +2025-05-22 08:09:53 140048127227648 INNODB MONITOR OUTPUT
7 +=====================================
8 +Per second averages calculated from the last 40 seconds
9 +-----------------
10 +BACKGROUND THREAD
11 +-----------------
12 +srv_master_thread loops: 1 srv_active, 0 srv_shutdown, 5092 srv_idle
13 +srv_master_thread log flush and writes: 0
14 +----------
15 +SEMAPHORES
16 +----------
17 +OS WAIT ARRAY INFO: reservation count 37
18 +OS WAIT ARRAY INFO: signal count 39
19 +RW-shared spins 0, rounds 0, OS waits 0
20 +RW-excl spins 0, rounds 0, OS waits 0
21 +RW-sx spins 0, rounds 0, OS waits 0
22 +Spin rounds per wait: 0.00 RW-shared, 0.00 RW-excl, 0.00 RW-sx
23 +------------
24 +TRANSACTIONS
25 +------------
26 +Trx id counter 1806
27 +Purge done for trx's n:o < 1803 undo n:o < 0 state: running but idle
28 +History list length 0
29 +LIST OF TRANSACTIONS FOR EACH SESSION:
30 +---TRANSACTION 421523007474904, not started
31 +0 lock struct(s), heap size 1128, 0 row lock(s)
32 +---TRANSACTION 421523007474096, not started
33 +0 lock struct(s), heap size 1128, 0 row lock(s)
34 +---TRANSACTION 421523007473288, not started
35 +0 lock struct(s), heap size 1128, 0 row lock(s)
36 +--------
37 +FILE I/O
38 +--------
39 +I/O thread 0 state: waiting for completed aio requests (insert buffer thread)
40 +I/O thread 1 state: waiting for completed aio requests (log thread)
41 +I/O thread 2 state: waiting for completed aio requests (read thread)
42 +I/O thread 3 state: waiting for completed aio requests (read thread)
43 +I/O thread 4 state: waiting for completed aio requests (read thread)
44 +I/O thread 5 state: waiting for completed aio requests (read thread)
45 +I/O thread 6 state: waiting for completed aio requests (write thread)
46 +I/O thread 7 state: waiting for completed aio requests (write thread)
47 +I/O thread 8 state: waiting for completed aio requests (write thread)
48 +I/O thread 9 state: waiting for completed aio requests (write thread)
49 +Pending normal aio reads: [0, 0, 0, 0] , aio writes: [0, 0, 0, 0] ,
50 + ibuf aio reads:, log i/o's:
51 +Pending flushes (fsync) log: 0; buffer pool: 0
52 +1026 OS file reads, 276 OS file writes, 116 OS fsyncs
53 +0.00 reads/s, 0 avg bytes/read, 0.00 writes/s, 0.00 fsyncs/s
54 +-------------------------------------
55 +INSERT BUFFER AND ADAPTIVE HASH INDEX
56 +-------------------------------------
57 +Ibuf: size 1, free list len 0, seg size 2, 0 merges
58 +merged operations:
59 + insert 0, delete mark 0, delete 0
60 +discarded operations:
61 + insert 0, delete mark 0, delete 0
62 +Hash table size 34679, node heap has 0 buffer(s)
63 +Hash table size 34679, node heap has 0 buffer(s)
64 +Hash table size 34679, node heap has 4 buffer(s)
65 +Hash table size 34679, node heap has 0 buffer(s)
66 +Hash table size 34679, node heap has 0 buffer(s)
67 +Hash table size 34679, node heap has 0 buffer(s)
68 +Hash table size 34679, node heap has 1 buffer(s)
69 +Hash table size 34679, node heap has 0 buffer(s)
70 +0.00 hash searches/s, 0.00 non-hash searches/s
71 +---
72 +LOG
73 +---
74 +Log sequence number 31603995
75 +Log buffer assigned up to 31603995
76 +Log buffer completed up to 31603995
77 +Log written up to 31603995
78 +Log flushed up to 31603995
79 +Added dirty pages up to 31603995
80 +Pages flushed up to 31603995
81 +Last checkpoint at 31603995
82 +Log minimum file id is 9
83 +Log maximum file id is 9
84 +33 log i/o's done, 0.00 log i/o's/second
85 +----------------------
86 +BUFFER POOL AND MEMORY
87 +----------------------
88 +Total large memory allocated 0
89 +Dictionary memory allocated 491793
90 +Buffer pool size 8191
91 +Free buffers 7037
92 +Database pages 1149
93 +Old database pages 444
94 +Modified db pages 0
95 +Pending reads 0
96 +Pending writes: LRU 0, flush list 0, single page 0
97 +Pages made young 0, not young 0
98 +0.00 youngs/s, 0.00 non-youngs/s
99 +Pages read 1004, created 145, written 202
100 +0.00 reads/s, 0.00 creates/s, 0.00 writes/s
101 +No buffer pool page gets since the last printout
102 +Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s
103 +LRU len: 1149, unzip_LRU len: 0
104 +I/O sum[0]:cur[0], unzip sum[0]:cur[0]
105 +--------------
106 +ROW OPERATIONS
107 +--------------
108 +0 queries inside InnoDB, 0 queries in queue
109 +0 read views open inside InnoDB
110 +Process ID=1, Main thread ID=140047405811456 , state=sleeping
111 +Number of rows inserted 0, updated 0, deleted 0, read 0
112 +0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s
113 +Number of system rows inserted 8, updated 331, deleted 8, read 4814
114 +0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s
115 +----------------------------
116 +END OF INNODB MONITOR OUTPUT
117 +============================
118 + |
119 ++--------+------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
src/go/plugin/go.d/collector/mysql/testdata/mysql/v8.0.30/global_variables.txt
+11 -9
@@ -1,9 +1,11 @@
1 -+--------------------------+-------+
2 -| Variable_name | Value |
3 -+--------------------------+-------+
4 -| disabled_storage_engines | |
5 -| log_bin | ON |
6 -| max_connections | 151 |
7 -| performance_schema | ON |
8 -| table_open_cache | 4000 |
9 -+--------------------------+-------+
1 ++---------------------------+----------+
2 +| Variable_name | Value |
3 ++---------------------------+----------+
4 +| disabled_storage_engines | |
5 +| innodb_log_file_size | 50331648 |
6 +| innodb_log_files_in_group | 2 |
7 +| log_bin | ON |
8 +| max_connections | 151 |
9 +| performance_schema | ON |
10 +| table_open_cache | 4000 |
11 ++---------------------------+----------+
src/go/plugin/go.d/collector/mysql/testdata/percona/v8.0.29/engine_innodb_status.txt new
+126
@@ -0,0 +1,126 @@
1 ++--------+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
2 +| Type | Name | Status |
3 ++--------+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
4 +| InnoDB | |
5 +=====================================
6 +2025-05-22 08:10:10 140637068326656 INNODB MONITOR OUTPUT
7 +=====================================
8 +Per second averages calculated from the last 15 seconds
9 +-----------------
10 +BACKGROUND THREAD
11 +-----------------
12 +srv_master_thread loops: 1 srv_active, 0 srv_shutdown, 5157 srv_idle
13 +srv_master_thread log flush and writes: 0
14 +----------
15 +SEMAPHORES
16 +----------
17 +OS WAIT ARRAY INFO: reservation count 2
18 +OS WAIT ARRAY INFO: signal count 2
19 +RW-shared spins 0, rounds 0, OS waits 0
20 +RW-excl spins 0, rounds 0, OS waits 0
21 +RW-sx spins 0, rounds 0, OS waits 0
22 +Spin rounds per wait: 0.00 RW-shared, 0.00 RW-excl, 0.00 RW-sx
23 +------------
24 +TRANSACTIONS
25 +------------
26 +Trx id counter 1803
27 +Purge done for trx's n:o < 1801 undo n:o < 0 state: running but idle
28 +History list length 0
29 +LIST OF TRANSACTIONS FOR EACH SESSION:
30 +---TRANSACTION 422111948574072, not started
31 +0 lock struct(s), heap size 1128, 0 row lock(s)
32 +---TRANSACTION 422111948573224, not started
33 +0 lock struct(s), heap size 1128, 0 row lock(s)
34 +---TRANSACTION 422111948572376, not started
35 +0 lock struct(s), heap size 1128, 0 row lock(s)
36 +--------
37 +FILE I/O
38 +--------
39 +I/O thread 0 state: waiting for completed aio requests (insert buffer thread)
40 +I/O thread 1 state: waiting for completed aio requests (log thread)
41 +I/O thread 2 state: waiting for completed aio requests (read thread)
42 +I/O thread 3 state: waiting for completed aio requests (read thread)
43 +I/O thread 4 state: waiting for completed aio requests (read thread)
44 +I/O thread 5 state: waiting for completed aio requests (read thread)
45 +I/O thread 6 state: waiting for completed aio requests (write thread)
46 +I/O thread 7 state: waiting for completed aio requests (write thread)
47 +I/O thread 8 state: waiting for completed aio requests (write thread)
48 +I/O thread 9 state: waiting for completed aio requests (write thread)
49 +Pending normal aio reads: [0, 0, 0, 0] , aio writes: [0, 0, 0, 0] ,
50 + ibuf aio reads:, log i/o's:
51 +Pending flushes (fsync) log: 0; buffer pool: 0
52 +1028 OS file reads, 220 OS file writes, 50 OS fsyncs
53 +0.00 reads/s, 0 avg bytes/read, 0.00 writes/s, 0.00 fsyncs/s
54 +-------------------------------------
55 +INSERT BUFFER AND ADAPTIVE HASH INDEX
56 +-------------------------------------
57 +Ibuf: size 1, free list len 0, seg size 2, 0 merges
58 +merged operations:
59 + insert 0, delete mark 0, delete 0
60 +discarded operations:
61 + insert 0, delete mark 0, delete 0
62 +Hash table size 34679, node heap has 0 buffer(s)
63 +Hash table size 34679, node heap has 0 buffer(s)
64 +Hash table size 34679, node heap has 0 buffer(s)
65 +Hash table size 34679, node heap has 0 buffer(s)
66 +Hash table size 34679, node heap has 0 buffer(s)
67 +Hash table size 34679, node heap has 0 buffer(s)
68 +Hash table size 34679, node heap has 4 buffer(s)
69 +Hash table size 34679, node heap has 1 buffer(s)
70 +0.00 hash searches/s, 0.00 non-hash searches/s
71 +---
72 +LOG
73 +---
74 +Log sequence number 31825026
75 +Log buffer assigned up to 31825026
76 +Log buffer completed up to 31825026
77 +Log written up to 31825026
78 +Log flushed up to 31825026
79 +Added dirty pages up to 31825026
80 +Pages flushed up to 31825026
81 +Last checkpoint at 31825026
82 +Checkpoint age target 83374592
83 +Modified age no less than 31825026
84 +Checkpoint age 0
85 +Max checkpoint age 80576000
86 +Number of logs 2
87 +Log size 50331648
88 +Log total size 100663296
89 +18 log i/o's done, 0.00 log i/o's/second
90 +----------------------
91 +BUFFER POOL AND MEMORY
92 +----------------------
93 +Total large memory allocated 0
94 +Dictionary memory allocated 483173
95 +Buffer pool size 8191
96 +Buffer pool size, bytes 134201344
97 +Free buffers 7039
98 +Database pages 1147
99 +Old database pages 443
100 +Modified db pages 0
101 +Pending reads 0
102 +Pending writes: LRU 0, flush list 0, single page 0
103 +Pages made young 0, not young 0
104 +0.00 youngs/s, 0.00 non-youngs/s
105 +Pages read 1003, created 144, written 171
106 +0.00 reads/s, 0.00 creates/s, 0.00 writes/s
107 +No buffer pool page gets since the last printout
108 +Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s
109 +LRU len: 1147, unzip_LRU len: 0
110 +I/O sum[0]:cur[0], unzip sum[0]:cur[0]
111 +--------------
112 +ROW OPERATIONS
113 +--------------
114 +0 queries inside InnoDB, 0 queries in queue
115 +0 read views open inside InnoDB
116 +0 RW transactions active inside InnoDB
117 +Process ID=1, Main thread ID=140636422407936 , state=sleeping
118 +Number of rows inserted 0, updated 0, deleted 0, read 0
119 +0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s
120 +Number of system rows inserted 0, updated 317, deleted 0, read 4899
121 +0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s
122 +----------------------------
123 +END OF INNODB MONITOR OUTPUT
124 +============================
125 + |
126 ++--------+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
src/go/plugin/go.d/collector/mysql/testdata/percona/v8.0.29/global_variables.txt
+11 -9
@@ -1,9 +1,11 @@
1 -+--------------------------+-------+
2 -| Variable_name | Value |
3 -+--------------------------+-------+
4 -| disabled_storage_engines | |
5 -| log_bin | ON |
6 -| max_connections | 151 |
7 -| performance_schema | ON |
8 -| table_open_cache | 4000 |
9 -+--------------------------+-------+
1 ++---------------------------+----------+
2 +| Variable_name | Value |
3 ++---------------------------+----------+
4 +| disabled_storage_engines | |
5 +| innodb_log_file_size | 50331648 |
6 +| innodb_log_files_in_group | 2 |
7 +| log_bin | ON |
8 +| max_connections | 151 |
9 +| performance_schema | ON |
10 +| table_open_cache | 4000 |
11 ++---------------------------+----------+