启动脚本
vim /usr/lib/systemd/system/mysqld_exporter.service
[Unit] Description=Prometheus MySQL Exporter After=network.target [Service] Type=simple User=exporter Group=exporter Restart=always ExecStart=/opt/mysqld_exporter-0.15.1/mysqld_exporter \ --config.my-cnf=/opt/mysqld_exporter-0.15.1/.mysqld_exporter.cnf \ --collect.global_status \ --collect.auto_increment.columns \ --collect.info_schema.processlist \ --collect.binlog_size \ --collect.info_schema.tablestats \ --collect.global_variables \ --collect.info_schema.innodb_metrics \ --collect.info_schema.query_response_time \ --collect.info_schema.userstats \ --collect.info_schema.tables \ --collect.perf_schema.tablelocks \ --collect.perf_schema.file_events \ --collect.perf_schema.eventswaits \ --collect.perf_schema.indexiowaits \ --collect.perf_schema.tableiowaits \ --collect.slave_status \ --web.listen-address=0.0.0.0:9104 [Install] WantedBy=multi-user.target
连接文件
vim /opt/mysqld_exporter-0.15.1/.mysqld_exporter.cnf
[client] user=user password=passwd host=xx.xxx.xx.xx port=3306
标签:info,exporter,--,collect,prometheus,mysqld,监控,mysql,schema From: https://www.cnblogs.com/rtnb/p/18125871