时间:2021-07-01 10:21:17 帮助过:33人阅读
下载网址:
https://github.com/prometheus/mysqld_exporter/releases/download/v0.10.0/mysqld_exporter-0.10.0.linux-amd64.tar.gz
grant replication client,process on . to ‘prom‘@‘localhost‘ identified by ‘xxxx‘;
grant select on performance_schma.* to ‘prom‘@‘localhost‘;
exit
[client]
user=prom
password=xxxx
:wq
prometheus端:
:wq
grafana面板:
显示mysql是否up(up为1):
mysql_up{instance=~"db1:9104"}
显示mysql的uptime时间:
mysql_global_status_uptime{instance=~"db1:9104"}
显示mysql的连接数:
mysql_global_status_threads_connected{instance=~"db1:9104"}
显示正在运行的进程数:
mysql_global_status_threads_running{instance=~"db1:9104"}
显示等待写入的个数:
mysql_global_status_innodb_data_pending_writes{instance=~"imanage-db1:9104"}
mysqld_exporter监控mysql
标签:releases mysq 信息 进程 网址 grep nec get release