MySQL and MariaDB monitoring · read-only

MySQL monitoring on one page, with the cause first.

WatchLog reads the server’s own statistics with a read-only user. One scroll says what MySQL or MariaDB waits on, which query is responsible, which service sends it and what changed, on Kubernetes and on Linux servers.

One read-only user. Never a row of your tables. Open source.

WatchLog’s MySQL page while connections run out: Right now says report-worker keeps its connections open and asleep and max_connections is almost used up, over the Busy with chart with the deploy as a pill.(opens the picture larger)
Right now

The answer first.

The top of the page is one sentence: connections are almost used up, writes are waiting on a lock, one query became five times slower. Under it, who causes it and what changed just before. When nothing is wrong, it says that.

  • Four numbers: statements a second, the mean query time against its usual, sessions waiting on a lock, connections of max_connections.
  • See what broke scrolls to the cause; Open goes to the workload or service behind it.
  • A rollout, or a deploy your scripts send to the events API, is named when it came just before.
Right now on WatchLog’s MySQL page while connections run out: report-worker keeps its connections open and asleep, with the four numbers.(opens the picture larger)
Broken: who takes the connections, and the deploy before it.
Right now on WatchLog’s MySQL page for the same server when it is calm: Everything is answering, with the same four numbers.(opens the picture larger)
The same server when it is calm.
The chart

One chart, four views.

Busy with, Statements by type, Rows and Connections share one chart, with rollouts and deploys as pills on it. Drag across it to choose a period: every section and drawer below follows.

  • Busy with: the active sessions by what they wait on, running, the disk, a lock, the application.
  • Hover for each series and the total; click a legend item to show it alone.
  • Connections show the running and the asleep against max_connections.
Who uses what

Which service spends the time, on which table.

Each service on the left, the tables it spends the server’s time on on the right, each ribbon as wide as its share. A service leaking connections or holding a lock is red.

  • A statement’s time is split over the services seen running it and the tables it names.
  • Click a service or a table to open it in a drawer.
  • When no statement can be paired with a service, two lists, and a line that says why.

Pairs need performance_schema, which MariaDB keeps off by default; the Setup view names the setting.

Queries and why

The worst query first, and why it is slow.

Queries come worst first: waiting on a lock, then far slower than usual, then reading far more than they return, then by their share of the time. Beside them, where the sessions’ time goes, in plain words, with the server’s own words under it.

  • A lock names who holds it, since when, and whether its transaction sits idle.
  • “Reads 4.1 M rows” for the rows it sends: probably missing an index, and which.
  • Statement text is the server’s digest: every value is already ?.
Drawers

Click anything, stay on the page.

Every row, ribbon, cause and card opens a drawer over the page, with the cause first, and the drawer is in the address, so you can send the link. Esc closes it; ↑ and ↓ move to the previous or next row.

  • A query: why first, its mean against its usual, the rows it reads, who sends it.
  • A service: the lock it holds or the connections it keeps, its open transactions.
  • The blocking tree: who holds the lock, its transaction, everyone waiting under it.
Everything else

Healthy things stay small.

Connections, Replication, Storage and InnoDB are one card each: one number, one sentence and a bar. A card turns amber or red only with a finding, and opens the rest in a drawer.

  • Connections: by client, so the one that keeps them asleep is named.
  • Storage: tables, binary logs, and the days the volume lasts.
  • InnoDB: the buffer pool, the history list and the redo log.
Setup

It tells you what it can’t see.

The Setup view lists what WatchLog reads and what is missing: a grant, a performance_schema consumer, the version. Each missing one says what it hides and the one step that adds it.

  • The same user works on MySQL and MariaDB, limited to two connections.
  • Every session is read-only and stops any statement after 2 seconds.
  • WatchLog never runs EXPLAIN, ANALYZE or KILL, and never reads a row.
Light or dark, desk or phone

The same answer on a phone.

The page comes in a light and a dark theme, and on a phone it keeps the same order: the answer first, then the chart and the rest.

Alerts that are already written

On from the first minute.

Press Monitor and these are created; you tick the ones that start on. Each goes to Slack, Telegram, email or a webhook, and says what, where and which service.

  • A session blocked for over a minutecritical
  • The binary logs fill the disk within a daycritical
  • A query running longer than 5 minutescritical
  • Replication stopped: the IO or SQL thread not runningcritical
  • Connections above 90 % of max_connections for 5 minuteswarning
  • A transaction open for over 30 minuteswarning
  • A statement far slower than usual for 10 minuteswarning
  • Replication lag above 30 seconds for 2 minuteswarning
Setup

One user. Read-only.

  1. Install the WatchLog agentOne command on a server, or one Helm chart on a cluster.
  2. WatchLog finds MySQL or MariaDBFrom the images and ports the agent already sees. It appears under Applications, named by what the server reports.
  3. Press MonitorRun the one command it writes: a read-only user. The page and its alerts start at once.
Platform
kubectl exec -it -n shop statefulset/mysql -- sh -c 'exec "$(command -v mariadb || command -v mysql)" -uroot -p -e "$0"' \
  'CREATE USER `watchlog`@`%` IDENTIFIED BY "…" WITH MAX_USER_CONNECTIONS 2;
  GRANT PROCESS, REPLICATION CLIENT /*M!100509 , SLAVE MONITOR */ ON *.* TO `watchlog`@`%`;
  GRANT SELECT ON performance_schema.* TO `watchlog`@`%`;
  GRANT SELECT ON mysql.innodb_table_stats TO `watchlog`@`%`'
docker exec -it shop-mysql-1 sh -c 'exec "$(command -v mariadb || command -v mysql)" -uroot -p -e "$0"' \
  'CREATE USER `watchlog`@`%` IDENTIFIED BY "…" WITH MAX_USER_CONNECTIONS 2;
  GRANT PROCESS, REPLICATION CLIENT /*M!100509 , SLAVE MONITOR */ ON *.* TO `watchlog`@`%`;
  GRANT SELECT ON performance_schema.* TO `watchlog`@`%`;
  GRANT SELECT ON mysql.innodb_table_stats TO `watchlog`@`%`'

The same command works on MySQL and MariaDB: it uses the client the image has. On MariaDB, turn performance_schema on for the queries and who uses what; lock waits and connections work without it.

Installed with apt or dnf on a Linux server? WatchLog finds it by its systemd unit, and the command runs with the mysql or mariadb client. Applications on Linux servers.

Connecting, step by step →
Compared

Against an exporter and dashboards.

WhatWatchLogmysqld_exporter and dashboards
Time to the first chartMinutesHours: an exporter, a scrape config, dashboards
Which service leaks connectionsNamed, with since whenNot available
Which service spends the time, on which tableOne picture, by share of the timeNot available
Who holds the lockThe root blocker and its serviceA query you run by hand
A statement slower than usualAgainst its own six hours beforeThresholds you tune
Works on plain Linux serversYes, and KubernetesDepends on your setup
Reads your rowsNeverDepends on the exporter’s queries
Ask your AI

Ask your AI about MySQL.

Claude and ChatGPT read the same facts through WatchLog’s MCP server, read-only: who blocks whom, who keeps the connections, the slowest statements and who sends them, replication.

Connect your assistant →

Why are stock updates hanging?

get_application · explain_problem

Writes to shop.stock wait on a row lock. shop/inventory-sync holds it: its transaction has been open for 4 minutes.

An example on Kubernetes, written from the docs.
Questions

MySQL monitoring, answered.

Which versions are supported?
MySQL 8.0 and later, MariaDB 10.6 and later, and Percona Server, on Kubernetes and on Linux servers (systemd services, process groups and containers).
What access does WatchLog need?
A user with PROCESS, REPLICATION CLIENT and SELECT on performance_schema, limited to two connections. WatchLog writes the command. Sessions are read-only and stop any statement after 2 seconds.
Does WatchLog read my data?
Never a row. Statement text is the digest text, values already replaced by ?. The latest deadlock is the one place the server writes values: the agent strips them before they leave the host.
Does it work on MariaDB?
Yes. MariaDB keeps performance_schema off by default; the Setup view names each setting it needs. Lock waits and connections work without them.
Will it slow the server down?
No. Measured under load: about 1.4 short statements a second and about a millisecond of server time a second. Tables are read every 10 minutes, capped at the 100 largest.
Does it work on RDS, Cloud SQL or Azure?
Yes, their admin user can grant these privileges. Their disks aren’t visible to the agent, so capacity shows only what the server reports, and the page says so.
Can I alert on one statement or one table?
Yes, from its drawer, in one click: a statement far slower than usual or above a mean, or a table above a size.
Is it free?
The open-source edition is free without limits. WatchLog Cloud is free for 5 servers or nodes.

See your own MySQL in five minutes.

Free on WatchLog Cloud for 5 servers or nodes, or run it yourself, open source.