Promethues:监控MySQL
mysqld_exporter:https://github.com/prometheus/mysqld_exporter
Supported versions:
- MySQL >= 5.6.
- MariaDB >= 10.1
数据库授权
1 | CREATE USER 'exporter'@'localhost' IDENTIFIED BY 'XXXXXXXX' WITH MAX_USER_CONNECTIONS 3; |
修改my.cnf配置:
1 | [client] |
重启MySQL
1 | systemctl restart mysqld |
下载
地址:https://github.com/prometheus/mysqld_exporter/releases
1 | mkdir -p /monitor/exporter |
启动
1 | cd mysqld_exporter |
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 时间之旅!
评论