Werk #19257: mk_mysql: detect MariaDB and MySQL sockets in /run/mysqld
| Component | Checks & agents | ||
| Title | mk_mysql: detect MariaDB and MySQL sockets in /run/mysqld | ||
| Date | Sep 28, 2026 | ||
| Level | Trivial Change | ||
| Class | Bug Fix | ||
| Compatibility | Compatible - no manual interaction needed | ||
| Checkmk versions & editions |
|
The mk_mysql agent plugin tries to detect the database socket automatically
when none is configured in mysql.cfg. Until now it only inspected the command
line of a running mysqld process. This did not work on default MariaDB
installations on Debian and Ubuntu, because the process is called mariadbd
and its command line does not contain the socket path. As a result, only the
default socket of the client was used, and additional MariaDB instances were
not monitored.
The plugin now additionally looks for socket files in /run/mysqld, the
default location on Debian and Ubuntu, and monitors each one as a separate
instance named after its socket path. The default socket
/run/mysqld/mysqld.sock keeps the instance name mysql, which it already
had before this change, so existing services are unaffected.
Sockets of the MySQL X Protocol plugin (mysqlx.sock), which Ubuntu's MySQL 8
packages create next to the regular socket, are ignored, as they cannot be
used by the classic MySQL client.