Monitoring temps réel
Collected metrics
The Aspirateur continuously collects over 120 metrics on each MariaDB / MySQL server:
- Performance — Queries/sec, slow queries, threads running/connected, table locks
- InnoDB — Buffer pool hit ratio, dirty pages, redo log, row locks, deadlocks
- Replication — Seconds behind master, IO/SQL thread status, GTID
- Connections — Active connections, max_connections, aborted connects/clients
- Cache — Query cache hit ratio, key buffer usage, table open cache
- Disk — Space used by datadir, binlogs, tmp, logs
- Hardware — CPU, RAM, swap, load average (via SSH)
Dashboard
The Dashboard (Dashboard.php) aggregates key metrics:
- Hit Ratio — InnoDB buffer pool and query cache efficiency
- Thread Cache — Thread reuse ratio
- Open Files — Open files vs limit
- Lock Ratio — Table lock vs row-level lock ratio
Data is exposed as JSON for integration with external dashboards (Grafana, etc.).
Server comparison
The Monitoring module allows comparing metrics between two or more servers. Useful for:
- Validating that a replica has the same performance as the master
- Comparing configurations between environments
- Detecting divergences after a failover
Post-mortem
The PostMortem module (PostMortem.php) allows analyzing system metrics after an incident. It formats performance data for detailed chronological analysis.