Prometheus+Grafana部署请参考上篇文章: Prometheus+Grafana部署:
1、创建MySQL监控用户
mysql> create user "prometheus"@"%" identified by 'NTQ34tg*@19VF';
mysql> grant select,replication client,process ON *.* to "prometheus"@"%";
mysql> flush privileges;
2、安装mysqld_exporter
wget https://github.com/prometheus/mysqld_exporter/releases/download/v0.14.0/mysqld_exporter-0.14.0.linux-amd64.tar.gz
3、prometheus服务器配置,编辑prometheus.yml文件
- job_name: "MySQL_百度saas"
static_configs:
- targets: ["xxxx.xxxx.xxx.xxx:9104"] # IP地址+端口
注意缩进和上面节点保持对齐,如下:
systemctl restart prometheus.service
标签:exporter,MySQL,prometheus,Grafana,Prometheus,mysql
From: https://www.cnblogs.com/qinziteng/p/17172800.html