Prometheus mysqld node exporter

组件下载地址:
https://github.com/prometheus/

vim /etc/systemd/system/mysqld_exporter.service
[Unit]
Description=node_exporter
Documentation=https://prometheus.io/
After=network.target

[Service]
Type=simple
ExecStart=/usr/local/prometheus/mysqld_exporter-0.12.1.linux-amd64/mysqld_exporter --config.my-cnf=/usr/local/prometheus/mysqld_exporter-0.12.1.linux-amd64/.my.cnf
Restart=on-failure

[Install]
WantedBy=multi-user.target

# cat .my.cnf
[client]
host=localhost
user=dumper
password=dumper

vim /etc/systemd/system/node_exporter.service
[Unit]
Description=node_exporter
Documentation=node_exporter

[Service]
ExecStart=/usr/local/prometheus/node_exporter-1.0.1.linux-amd64/node_exporter 
Restart=on-failure

[Install]
WantedBy=multi-user.target