MySQL and MariaDB
See what is running, waiting and lagging inside MySQL and MariaDB, with a read-only monitoring login.
What it answers
Questions an on-call engineer asks, which an AI client can answer with this plugin.
- What is running on the database right now, and how long has each transaction been open?
- Which transaction holds the lock the others are waiting for, and on which table?
- Is InnoDB keeping up with purge, and have there been deadlocks?
- Is the replica running, how far behind is it, and why did it stop?
- Which tables are the largest on disk?
- Which statements cost the server the most time, and which scan whole tables?
- Is the buffer pool big enough for the working set?
What it returns
Each of the plugin's read-only tools, described in words.
- Sessions on the MySQL or MariaDB server with their command, state, time, open InnoDB transaction and normalised statement
- InnoDB transactions waiting on a row or table lock in MySQL or MariaDB, each with the lock, the table and the transaction blocking it
- InnoDB health of the MySQL or MariaDB server in one row - open and waiting transactions, the oldest one, purge history, deadlocks, row lock waits and dirty pages
- This MySQL or MariaDB replica's channels - whether the IO and SQL threads run, seconds behind the source, the source and the last errors
- The largest InnoDB tables on the MySQL or MariaDB server by file size, with estimated rows and data and index size
- The statements that cost MySQL or MariaDB the most time, from the performance_schema statement digests, with calls, timings, rows and index use
- Each InnoDB buffer pool instance of the MySQL or MariaDB server - size, free, data and dirty pages, pending I/O, reads and the hit ratio
At a glance
- Plugin
- mysql 1.0.0
- Publisher
- levantar
- Platforms
- Linux, Windows, macOS
Tested on
- MySQL 8.0.46 and 8.4.13 and MariaDB 10.11.19 and 11.4.13 on Linux (Ubuntu, Docker), CI runner
- MySQL 8.4 and MariaDB 11.4 on macOS (Homebrew), CI runner
- MySQL 8.4 on Windows Server, CI runner
How it logs in
Without an explicit choice, install tries the methods that need no secret first, in this order.
- The agent's OS account on the same host, with no secret
- A user name and password
- A client certificate
The least-privilege login
The grant script in the pack. secronyx plugin setup mysql --apply runs it with a random password for the new login, or you can run it by hand.
See it run
Recording coming. Install, setup and status runs for this plugin are recorded on the shared test lab, and appear here once they have run.
Read-only, in layers
Every query is fixed text inside the signed pack: one SELECT or WITH statement whose functions are all on the agent's allowlist for that database. It runs in a read-only transaction with server-side statement and lock timeouts, and is always rolled back. Callers can only fill in typed, bounded arguments, which are bound as parameters.
These controls narrow what the plugin can do; none of them is a guarantee on its own. An administrator can still accept a more powerful login on purpose (audited and shown in status), root or Administrator on the host can replace the agent, and the plugin can read whatever its login can see.