mysqlrouter_exporter Project Overview

mysqlrouter_exporter is a productized Prometheus exporter for MySQL Router. It has been split out of the main dbbot repository into a standalone project, while continuing to stay compatible with dbbot’s YAML configuration format, install variables, and service launch style.

1. What it solves

Use this project when you want to:

  • collect MySQL Router metrics without depending on the full dbbot source tree
  • keep Router exporter releases on their own cadence
  • deploy Router monitoring into an existing Prometheus environment outside dbbot
  • keep using the same config shape that dbbot already documents

2. What it collects

The standalone project focuses on MySQL Router runtime and access-layer visibility:

  • Router availability and scrape health
  • Router build information and start time
  • per-route active connections, total connections, blocked hosts, health, and destinations
  • metadata refresh counters and recent refresh endpoint information
  • optional route connection byte counters
  • local listener checks by parsing mysqlrouter.conf

The listener checks are the main differentiator of this implementation. Instead of only trusting the Router REST API, it also verifies that the listeners declared in mysqlrouter.conf are actually accepting TCP connections.

3. Relationship with dbbot

dbbot still keeps the integrated deployment path for Router metrics:

  • router_exporter_install.yml remains the standard playbook entry
  • mysqlrouter_exporter_install_type: dbbot uses the compatibility binary bundled in the dbbot release package
  • mysqlrouter_exporter_install_type: package downloads the standalone release archive from the upstream GitHub repository
  • Router target registration still goes through dbbotctl exporter register -t router

In other words, the project is now independently versioned, but dbbot users do not lose the one-stop workflow.

4. Standalone usage model

Outside dbbot, the project is intended to be easy to run in a production-style layout:

  • binary: /usr/local/bin/mysqlrouter_exporter
  • config: /etc/mysqlrouter_exporter/config.yml
  • password file: /etc/mysqlrouter_exporter/router_api_password
  • service name: mysqlrouter_exporter

It supports three input styles:

  • legacy-compatible YAML config
  • environment variables
  • command-line flags

This makes it suitable for direct host installs, existing systemd-based monitoring estates, and release pinning independent from dbbot.