Monitoring MySQL with Prometheus and Grafana
summary
Prometheus scrapes MySQL exporters over HTTP /metrics and stores high-frequency samples while Grafana visualizes them with Percona ready-made dashboards, requiring matching exporter instance names. Use the node_exporter for OS metrics and pt_heartbeat in the DB to measure replication lag; expensive exporter queries must be throttled by configuring some metrics at 10s and others at 1m to avoid overloading MySQL. Alertmanager groups and inhibits alerts, Prometheus 2.0 brings a new TSDB and lower staleness, and the setup proves low-footprint and production-ready.
AI-written summary · about
chapters (15)
- 0:00Introduction to monitoring
- 3:28What is Prometheus
- 8:51How Prometheus collects metrics
- 13:13Key Prometheus exporters
- 17:34Monitoring MySQL replication
- 19:42Prometheus web interface
- 24:41Recording and alerting rules
- 28:34Alert Manager features
- 31:45High availability setup
- 33:33Introduction to Grafana
- 39:01PMM dashboards for MySQL
- 44:29Grafana dashboard customization
- 45:12Developer engagement with metrics
- 47:39Prometheus 2.0 improvements
- 52:16Q&A session
