diff --git a/CHANGELOG.md b/CHANGELOG.md index f90d4df7..f467765d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -72,6 +72,7 @@ Monitoring Plugins: * journald-query: Improve output * mysql-aria: Remove WARN if `aria_pagecache_read_requests` > 0 and `pct_aria_keys_from_mem` < 95% * mysql-connections: Report and warn on current usage instead of peak usage, and improved output. +* mysql-connections: Add perfdata mysql_max_used_connections * mysql-innodb-buffer-pool-size: Improve code and output * mysql-logfile: Stop magic auto-configure if `--server-log` is given * mysql-logfile: Returns OK instead of UNKNOWN if logfile is found but empty diff --git a/check-plugins/mysql-connections/README.rst b/check-plugins/mysql-connections/README.rst index 58818b12..cf7af90b 100644 --- a/check-plugins/mysql-connections/README.rst +++ b/check-plugins/mysql-connections/README.rst @@ -96,6 +96,7 @@ Perfdata / Metrics mysql_connections, Continous Counter, "Value of the MySQL ``Connections`` status variable. Number of all connection attempts (both successful and unsuccessful)." mysql_interactive_timeout, Seconds, "Value of the MySQL ``interactive_timeout`` system variable. Time in seconds that the server waits for an interactive connection (one that connects with the mysql_real_connect() CLIENT_INTERACTIVE option) to become active before closing it." mysql_max_connections, Number, "Value of the MySQL ``max_connections`` system variable. The maximum number of simultaneous client connections." + mysql_max_used_connections, Number, ""Value of the MySQL ``Max_used_connections`` status variable. Max number of connections ever open at the same time." mysql_pct_connections_aborted, Percentage, Aborted_connects / Connections \* 100 mysql_pct_connections_used, Percentage, Threads_connected / max_connections \* 100 mysql_threads_connected, None, "Value of the MySQL ``Threads_connected`` status variable. Number of clients connected to the server. Is inaccurate when the thread pool is in use, since each client connection does not correspond to a dedicated thread in that case." diff --git a/check-plugins/mysql-connections/mysql-connections b/check-plugins/mysql-connections/mysql-connections index f369fc40..56de0662 100755 --- a/check-plugins/mysql-connections/mysql-connections +++ b/check-plugins/mysql-connections/mysql-connections @@ -22,7 +22,7 @@ from lib.globals import (STATE_OK, STATE_UNKNOWN, # pylint: disable=C0413 STATE_WARN) __author__ = 'Linuxfabrik GmbH, Zurich/Switzerland' -__version__ = '2023100902' +__version__ = '2023102601' DESCRIPTION = """Checks the connection usage rate, the rate of aborted connections and if name resolution is active for new connections on MySQL/MariaDB.""" @@ -217,6 +217,7 @@ def main(): perfdata += lib.base.get_perfdata('mysql_aborted_connects', mystat['Aborted_connects'], 'c', None, None, 0, None) perfdata += lib.base.get_perfdata('mysql_connections', mystat['Connections'], 'c', None, None, 0, None) + perfdata += lib.base.get_perfdata('mysql_max_used_connections', mystat['Max_used_connections'], None, None, None, 0, None) perfdata += lib.base.get_perfdata('mysql_threads_connected', mystat['Threads_connected'], None, None, None, 0, None) perfdata += lib.base.get_perfdata('mysql_threads_running', mystat['Threads_running'], None, None, None, 0, None)