Skip to content

Instantly share code, notes, and snippets.

@lepiaf
Last active May 23, 2022 12:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save lepiaf/5e5f32f637e0d0cb23888d6fd28ba215 to your computer and use it in GitHub Desktop.
Save lepiaf/5e5f32f637e0d0cb23888d6fd28ba215 to your computer and use it in GitHub Desktop.
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