TL;DR
- 要はこれ
MySQL 26.10.0で 商用版MySQL MySQL HeatWave(クラウド版)からバックポートされた機能。
インストール自体は簡単。
mysql2610 10> INSTALL COMPONENT 'file://component_health_monitor';
Query OK, 0 rows affected (0.402 sec)
これだけで 日々の覚書: HeatWave MySQLがどれくらいVanilla MySQL GPL版と同じくらいか考える旅 / performance_schema編 に列挙していたようなモニター系のテーブルが有効になる。
設定できそうなパラメータ群はこれ。
mysql2610 11> SELECT variable_name, SUBSTR(variable_value, 1, 15) FROM performance_schema.global_variables WHERE variable_name LIKE 'health%';
+----------------------------------------------+-------------------------------+
| variable_name | SUBSTR(variable_value, 1, 15) |
+----------------------------------------------+-------------------------------+
| health_monitor.disk_fallback_enable | OFF |
| health_monitor.disk_fallback_force | OFF |
| health_monitor.disk_forecast_report_interval | 240 |
| health_monitor.disk_forecast_run_mode | NORMAL |
| health_monitor.disk_forecast_running | ON |
| health_monitor.disk_forecast_sample_interval | 60 |
| health_monitor.disk_forecast_test_filename | |
| health_monitor.disk_low_space_critical_level | 2000 |
| health_monitor.disk_low_space_duration | 300 |
| health_monitor.disk_low_space_level | 5000 |
| health_monitor.disk_low_space_percent | 4 |
| health_monitor.disk_monitored | |
| health_monitor.disk_recovery_enable | ON |
| health_monitor.disk_recovery_increment | 300 |
| health_monitor.disk_recovery_level | 5 |
| health_monitor.disk_recovery_max_cycles | 3 |
| health_monitor.disk_recovery_time_1 | 300 |
| health_monitor.disk_recovery_time_2 | 300 |
| health_monitor.disk_recovery_window | 86400 |
| health_monitor.disk_retention | 86400 |
| health_monitor.disk_running | ON |
| health_monitor.disk_sample_rate | 60 |
| health_monitor.disk_usage_warning_level_1 | 20 |
| health_monitor.disk_usage_warning_level_2 | 10 |
| health_monitor.disk_usage_warning_level_3 | 5 |
| health_monitor.memory_report_definition | [{ "title" : " |
| health_monitor.memory_reporting | ON |
| health_monitor.memory_retention | 86400 |
| health_monitor.memory_running | ON |
| health_monitor.memory_sample_rate | 60 |
| health_monitor.memory_usage_warning_level_1 | 1024 |
| health_monitor.memory_usage_warning_level_2 | 500 |
| health_monitor.memory_usage_warning_level_3 | 100 |
| health_monitor.periodic_report_definition | [{ "title" : |
| health_monitor.periodic_reporting | OFF |
| health_monitor.status_interval | 10 |
| health_monitor.system_cpu_stats_history | ON |
| health_monitor.system_disk_stats_history | ON |
| health_monitor.system_memory_stats_history | ON |
| health_monitor.system_process_stats_history | ON |
| health_monitor.system_retention | 86400 |
| health_monitor.system_running | ON |
| health_monitor.system_sample_rate | 60 |
+----------------------------------------------+-------------------------------+
43 rows in set (0.001 sec)
中でも凶悪(?) なのが health_monitor.disk_fallback_enable で、デフォルトはもちろんOFFだけどDiskの残量が指定した閾値を下回ると強制的に SET GLOBAL offline_mode = ON, super_read_only = ON が走るところ。
( ´-`).oO(迂闊にこのへんの権限をいじるアカウントが無いと、Diskを拡張するしかなくて、MySQL HeatWaveだったらまだしもオンプレでこれが着火したらそれは落ちているのとほぼ一緒なのでは…
ドキュメント にももちろんあるけど、日本語話者なら(英語版もあるだろうけど) Oracle CloudのMySQL HeatWaveのヘルスモニターに関する記述 が「何が起こるのか何を起こせるのか」がまとまっていて読みやすい。
グラフはPMMとかで見ればいいけど、やっぱりSQLでもゴニョりたいとかそういう人向け。
なおヘルスモニターの出力は log_error_verbosity が3ならエラーログにも吐いてくれる。当然 performance_schema.error_log からSELECTもできる(5MB以内なら)
2026-10-22T03:14:17.330992-00:00 10 [Note] [MY-013694] [Health] Health Monitor: Registered with option usage tracker
2026-10-22T03:14:17.331004-00:00 10 [Note] [MY-013694] [Health] Health Monitor: Started
2026-10-22T03:14:27.000393-00:00 0 [Note] [MY-013694] [Health] Disk Collector: New Volume Detected (499.8G): running=ON, volume monitored='/usr/mysql/26.10.0/data/', base interval=10s, sample interval=60s, retention=86400s, max samples=1440, status interval=10, low level=5000 MiB, low percent=4%%, critical level=2000 MiB, warning levels=20/10/5%%, fallback (enable=OFF, force=OFF), low space duration=300s, recovery (enable=ON, level=5%%, time 1=300s, time 2=300s, max cycles=3, increment=300, window=86400)
2026-10-22T03:14:27.000447-00:00 0 [Warning] [MY-013695] [Health] Disk: Warning Level 1 (103.9G): volume='/usr/mysql/26.10.0/data/', avail=94.3G, total=499.8G, used=81.1%%, reserve=4.9G, critical=2.0G, recovery=29.6G, warnings=103.9G/54.4G/29.6G
2026-10-22T03:14:37.000345-00:00 0 [Warning] [MY-013695] [Health] Disk: Warning Level 1 (103.9G): volume='/usr/mysql/26.10.0/data/', avail=94.3G, total=499.8G, used=81.1%%, reserve=4.9G, critical=2.0G, recovery=29.6G, warnings=103.9G/54.4G/29.6G
2026-10-22T03:15:17.000448-00:00 0 [Note] [MY-013694] [Health] Memory: avail=13.3G, total=15.3G, used=13.1%%, mysqld=381M, warnings=1.0G/500M/100M
2026-10-22T03:15:27.000124-00:00 0 [Note] [MY-013694] [Health] Disk: Not enough data points for forecasting: Needed: 2880 Current: 1: running=ON, volume='/usr/mysql/26.10.0/data/', used=405.5G, total=499.8G, used=81.1%%, metrics=1, last forecast=n/a
2026-10-22T03:24:17.000446-00:00 0 [Note] [MY-013694] [Health] Memory: avail=13.3G, total=15.3G, used=13.0%%, mysqld=388M, warnings=1.0G/500M/100M
2026-10-22T03:24:17.000453-00:00 0 [Warning] [MY-013695] [Health] Disk: Warning Level 1 (103.9G): volume='/usr/mysql/26.10.0/data/', avail=94.3G, total=499.8G, used=81.1%%, reserve=4.9G, critical=2.0G, recovery=29.6G, warnings=103.9G/54.4G/29.6G
久々に楽しい。新機能(?) でした。俺はこれ好き。


