← All dashboards

mysql

https://github.com/prometheus/mysqld_exporter

mysql授权

CREATE USER 'exporter'@'192.168.1.2' IDENTIFIED BY 'password';
GRANT PROCESS, REPLICATION CLIENT, SELECT ON *.* TO 'exporter'@'192.168.1.2' WITH MAX_USER_CONNECTIONS 3;
commit;
FLUSH PRIVILEGES;
select User,Host,authentication_string,Password from mysql.user;

mysqld-exporter部署

date -R
mv /etc/timezone /etc/timezone-`date +%Y%m%d-%H%M%S`
echo 'Asia/Shanghai' > /etc/timezone
mv /etc/localtime /etc/localtime-`date +%Y%m%d-%H%M%S`
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

docker pull prom/mysqld-exporter
docker rm -f mysqld-exporter
docker run -d \
--name mysqld-exporter \
-v /etc/timezone:/etc/timezone \
-v /etc/localtime:/etc/localtime \
-p 9104:9104 \
-e DATA_SOURCE_NAME="exporter:password@(192.168.1.1:3306)/" \
--restart=unless-stopped \
prom/mysqld-exporter
docker logs -f --tail 10 mysqld-exporter

dashboard from

https://github.com/percona/grafana-dashboards/blob/master/dashboards/MySQL_Overview.json

2020.4.16 增加主从复制同步相关

Dashboard revisions

RevisionDecscriptionCreated

Reviews

Login or Sign up to write a review

Reviews from the community

Get this dashboard

Data source:

Dependencies:

Import the dashboard template:

or

Download JSON

Docs: Importing dashboards

Downloads: 5,775