You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(mysql-innodb-log-waits): stop alerting on write log efficiency
Per the MariaDB InnoDB source, only Innodb_log_waits (log_sys.waits,
incremented on the WRITE_BACKOFF path; srv0mon.cc labels it "Number of
log waits due to small log buffer") signals a too-small log buffer. The
write log efficiency ratio Innodb_log_writes / Innodb_log_write_requests
reflects group commit / innodb_flush_log_at_trx_commit batching, not
buffer capacity, so raising innodb_log_buffer_size cannot improve it.
MySQLTuner alerts and recommends a bigger buffer when that ratio drops
below 90%; this plugin now deviates deliberately and treats write log
efficiency as informational only, alerting solely on log waits. The
deviation is documented in the source, DESCRIPTION and README. The
Director basket is regenerated via build-basket --auto.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,6 +35,7 @@ Monitoring Plugins:
35
35
* disk-io: per-disk performance data now reports read/write throughput per second and disk busy percentage as ready-to-graph values instead of raw cumulative counters; re-import the disk-io Grafana dashboard after updating ([#320](https://github.com/Linuxfabrik/monitoring-plugins/issues/320))
36
36
* disk-usage: mountpoints are now filtered with `--match` and `--ignore`, consistent with the other plugins; the previous `--include-pattern`/`--include-regex`/`--exclude-pattern`/`--exclude-regex` options keep working unchanged
37
37
* docker-stats, podman-stats: containers can now be selected or excluded by name with `--match` / `--ignore`, consistent with the docker-container/podman-container checks, and `--no-match-severity` sets the state when nothing matches
38
+
* mysql-innodb-log-waits: no longer warns on a low InnoDB write log efficiency, which does not actually indicate an undersized log buffer and cannot be improved by raising `innodb_log_buffer_size`; the check now alerts only on real InnoDB log waits, so the buffer-size recommendation appears only when it will help
38
39
* mysql-logfile: documents that `--ignore-pattern`/`--ignore-regex` match against the lowercased log line, and shows how to silence the harmless idle-connection-timeout warning (server closing an idle connection after `wait_timeout`) without hiding real connection errors
39
40
* podman-info, podman-stats: gained `--user` to report on a specific rootless user's Podman. Running these checks as root only sees root's own containers, so use `--user` for rootless setups (running via sudo does not cover other users)
40
41
* snmp: `--device` now also accepts an absolute path, so the OID definition CSV can be stored outside the plugin directory ([#1308](https://github.com/Linuxfabrik/monitoring-plugins/issues/1308))
Copy file name to clipboardExpand all lines: check-plugins/mysql-innodb-log-waits/README.md
+36-20Lines changed: 36 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,23 +3,27 @@
3
3
4
4
## Overview
5
5
6
-
Checks two related InnoDB log buffer health metrics in MySQL/MariaDB:
6
+
Checks InnoDB redo log buffer health in MySQL/MariaDB:
7
7
8
-
1.**Log waits** (`Innodb_log_waits` / `Innodb_log_writes`) - how often InnoDB had to wait for log writes to be flushed because the log buffer was full. Anything above 0% indicates that `innodb_log_buffer_size` is too small for the write workload.
9
-
2.**Write log efficiency** (`(Innodb_log_write_requests - Innodb_log_writes) / Innodb_log_write_requests * 100`) - how many log write requests were absorbed by the buffer without needing a physical disk write. Below 90% indicates `innodb_log_buffer_size` is too small for the write workload.
8
+
1.**Log waits** (`Innodb_log_waits` / `Innodb_log_writes`) - how often InnoDB had to wait because the in-memory log buffer was full before its contents could be flushed to disk. Per the MariaDB InnoDB source this counter is the authoritative signal for an undersized log buffer ("Number of log waits due to small log buffer"). Anything above 0 means `innodb_log_buffer_size` was too small for the write workload at some point. This is the only metric the plugin alerts on.
9
+
2.**Write log efficiency** (`(Innodb_log_write_requests - Innodb_log_writes) / Innodb_log_write_requests * 100`) - the share of in-memory log appends that were batched into a shared physical write. This ratio is governed by group commit and `innodb_flush_log_at_trx_commit`, not by buffer size, so the plugin reports it for trending only. It never alerts and never recommends resizing the buffer.
10
+
11
+
**Deliberate deviation from MySQLTuner:**
12
+
13
+
The check logic is derived from MySQLTuner, which alerts and recommends increasing `innodb_log_buffer_size` whenever write log efficiency drops below 90%. The MariaDB InnoDB source does not support that link: only `Innodb_log_waits` reflects a too-small buffer, while the write efficiency ratio reflects commit/flush batching. This plugin therefore treats write log efficiency as informational only and alerts solely on log waits.
10
14
11
15
**Important Notes:**
12
16
13
17
* See [additional notes for all mysql monitoring plugins](https://linuxfabrik.github.io/monitoring-plugins/plugins-mysql/)
14
18
* If the InnoDB engine is not available or is disabled, the plugin reports OK with an info message instead of UNKNOWN
15
-
* The Write Log efficiency check is silently skipped on MySQL versions that do not expose `Innodb_log_write_requests` (very old MySQL pre-5.0)
16
-
* When `Innodb_log_writes > Innodb_log_write_requests` (a physically impossible state that can briefly appear during counter resets), the plugin emits an info note instead of alerting
19
+
* The Write Log efficiency line is silently skipped on MySQL versions that do not expose `Innodb_log_write_requests` (very old MySQL pre-5.0)
20
+
* When `Innodb_log_writes > Innodb_log_write_requests` (a physically impossible state that can briefly appear during counter resets), the plugin emits an info note instead of a value
17
21
18
22
**Data Collection:**
19
23
20
24
* Queries `SHOW GLOBAL VARIABLES` for `innodb_log_buffer_size`
21
25
* Queries `SHOW GLOBAL STATUS` for `Innodb_log_waits`, `Innodb_log_writes` and `Innodb_log_write_requests`
22
-
* Logic is taken from [MySQLTuner](https://github.com/major/MySQLTuner-perl):mysql_innodb() (sections "InnoDB Log Waits" and "InnoDB Write Log efficiency") and has been verified in sync with MySQLTuner
26
+
* Logic is derived from [MySQLTuner](https://github.com/major/MySQLTuner-perl):mysql_innodb() (sections "InnoDB Log Waits" and "InnoDB Write Log efficiency"), with the deliberate deviation on write log efficiency described above
Copy file name to clipboardExpand all lines: check-plugins/mysql-innodb-log-waits/icingaweb2-module-director/mysql-innodb-log-waits.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -80,7 +80,7 @@
80
80
"tpl-service-generic"
81
81
],
82
82
"max_check_attempts": 5,
83
-
"notes": "Checks two related InnoDB log buffer metrics in MySQL/MariaDB: 1. **Log waits** (`Innodb_log_waits` / `Innodb_log_writes`) - how often InnoDB had to wait for log writes to be flushed because the log buffer was full. Anything above 0% indicates that `innodb_log_buffer_size` is too small for the write workload. 2. **Write log efficiency** ((`Innodb_log_write_requests` - `Innodb_log_writes`) / `Innodb_log_write_requests` * 100) - how many log write requests were absorbed by the buffer without needing a physical disk write. Below 90% indicates `innodb_log_buffer_size` is too small for the write workload. Alerts on either condition.",
83
+
"notes": "Checks InnoDB redo log buffer health in MySQL/MariaDB. Primary check - **Log waits** (`Innodb_log_waits` / `Innodb_log_writes`): how often InnoDB had to wait because the in-memory log buffer was full before its contents could be flushed to disk. Per the MariaDB InnoDB source this counter is the authoritative signal for an undersized log buffer (\"Number of log waits due to small log buffer\"). Any value above 0 means `innodb_log_buffer_size` was too small for the write workload at some point, so the plugin alerts and recommends a larger buffer. Secondary informational metric - **Write log efficiency** ((`Innodb_log_write_requests` - `Innodb_log_writes`) / `Innodb_log_write_requests` * 100): the share of in-memory log appends that were batched into a shared physical write. This ratio is governed by group commit and `innodb_flush_log_at_trx_commit`, not by buffer size, so the plugin reports it for trending but never alerts on it and never recommends resizing the buffer based on it. Deliberate deviation from MySQLTuner: MySQLTuner alerts and recommends increasing `innodb_log_buffer_size` whenever write log efficiency drops below 90%. The MariaDB InnoDB source does not support that link, so this plugin treats write log efficiency as informational only and alerts solely on log waits.",
0 commit comments