赞
踩
安装mysqld_exporter
由于mysqld_exporter需要连接到MySQL,创建用户并赋予所需的权限
- GRANT REPLICATION CLIENT,PROCESS ON *.* TO 'mysql_monitor'@'localhost' identified by 'mysql_monitor';
- GRANT SELECT ON *.* TO 'mysql_monitor'@'localhost';
修改配置文件
- [client]
- user=mysql_monitor
- password=mysql_monitor
运行
nohup mysqld_exporter --config.my-cnf=/etc/my.cnf &
- - job_name: 'mysql'
- static_configs:
- - targets: ['10.130.4.**:9104']
- - targets: ['10.130.4.**:9104']
- - targets: ['172.18.1.**:9104']
- - targets: ['172.18.1.**:9104']
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。