| 服务 | mysqld_exporter(默认 9104) |
|---|---|
| 协议 | TCP/HTTP(/metrics) |
| 用途 | MySQL 指标采集 |
| 安全等级 | 仅监控网段 |
exporter 需持数据库凭证(--config.my-cnf),凭证文件权限要收紧;/metrics 历史上有过信息泄漏场景。
部署与验证
部署与验证
mysqld_exporter --config.my-cnf=/etc/mysqld_exporter.cnf --web.listen-address=:9104
curl -s http://db01:9104/metrics | grep mysql_up