Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Prometheus - mysql_exporter systemd
# /etc/systemd/system/mysql_exporter.service
[Unit]
Description=Mysql Exporter
Wants=network-online.target
After=network-online.target
[Service]
User=root
Group=root
Type=simple
Environment='DATA_SOURCE_NAME=exporter:exporter@(localhost:3306)/'
ExecStart=/root/mysqld_exporter-0.10.0.linux-amd64/mysqld_exporter
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment