Skip to content
Prometheus exporter for MySQL Router.
Go
Branch: master
Clone or download
Latest commit d49dc8f Sep 6, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.drone.yml 💚 CI Aug 18, 2019
LICENSE 🎉 Initial commit Aug 18, 2019
README.md 🎨 Read credentials from environment variables Aug 21, 2019
go.mod 🎉 Initial commit Aug 18, 2019
main.go 🎨 Add router_hostname each metric Aug 25, 2019

README.md

mysqlrouter_exporter

Build Status

Usage

  1. Download binary from release.
  2. Move to /usr/local/bin/
  3. Add systemd script.
  4. Start
[Unit]
Description=mysqlrouter-exporter
Documentation=https://github.com/rluisr/mysqlrouter-exporter
After=network-online.target

[Service]
Type=simple
Environment="MYSQLROUTER_EXPORTER_URL=https://mysqlrouter-test.xzy.pw"
Environment="MYSQLROUTER_EXPORTER_USER=luis"
Environment="MYSQLROUTER_EXPORTER_PASS=luis"
ExecStart=/usr/local/bin/mysqlrouter_exporter

[Install]
WantedBy=multi-user.target

You must set these environment variables:

  • MYSQLROUTER_EXPORTER_URL: MySQL Router REST API URL.
  • MYSQLROUTER_EXPORTER_USER: Username for REST API
  • MYSQLROUTER_EXPORTER_PASS: Password for REST API

Default exporter listen port is 49152.
If you want change it use MYSQLROUTER_EXPORTER_PORT.

Prometheus configuration

scrape_configs:
  - job_name: 'mysqlrouter'
    static_configs:
      - targets:
        - mysqlrouter01.luis.local:49152

Grafana Dashboard

Grafana Dashboard

available here.

You can’t perform that action at this time.