feat: auto-cleanup metrics older than 60 days

- MariaDB event scheduler: daily cleanup at 03:00
- Production: event created, event_scheduler=ON, config in /etc/mysql/mariadb.conf.d/
- Docker: --event-scheduler=ON in db service command
- Migration 008: creates event on fresh installs
- 20 servers x 1 month ≈ 1GB (vs unlimited growth)

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
mirivlad 2026-04-14 19:21:40 +08:00
parent e4588f7044
commit 3255bfae29
1 changed files with 1 additions and 0 deletions

View File

@ -41,6 +41,7 @@ services:
--character-set-server=utf8mb4
--collation-server=utf8mb4_unicode_ci
--max-connections=100
--event-scheduler=ON
volumes:
- db_data:/var/lib/mysql
healthcheck: