Home

mysqldexporter

mysqld_exporter, commonly referred to as mysqld_exporter or mysqld_exporter, is a Prometheus exporter designed to collect and expose metrics from MySQL and MariaDB servers. It runs as a standalone application, typically as a small network service that exposes an HTTP endpoint (usually /metrics) that Prometheus can scrape. The exporter is written in Go and relies on a MySQL client to query status, variables, and other performance-related data from the database server. It supports multiple collectors, including global status and variables, performance schema, and InnoDB metrics, allowing operators to observe a wide range of server health and performance indicators.

Operation and configuration are centered around a data source name (DSN) that specifies how the exporter connects

Security and deployment considerations include using a dedicated MySQL account with limited privileges, avoiding exposure of

to
MySQL.
A
DSN
typically
includes
the
host,
port,
user,
password,
and
optional
database,
for
example
user:password@tcp(host:3306)/
or
a
similar
form
depending
on
the
environment.
The
exporter
can
be
run
as
a
binary
or
via
a
Docker
image
and
can
be
configured
with
command-line
flags
to
enable
or
disable
specific
collectors,
set
timeouts,
and
tune
collection
intervals.
Prometheus
is
configured
to
scrape
the
exporter’s
/metrics
endpoint,
producing
time-series
data
for
alerting
and
dashboards.
credentials,
and
securing
the
metrics
endpoint.
It
is
widely
used
in
Kubernetes
and
on
traditional
servers
as
part
of
the
Prometheus
monitoring
stack.
mysqld_exporter
is
open
source
and
maintained
as
part
of
the
Prometheus
ecosystem.