MySQL max parallel connections

Hi,

this check (MySQL connections) records the highest connection count, since the service started.
This might or might not be helpful sometimes, but fact is that the CRIT state will never go away unless one restarts the service or changes the crit limit.

Is there a way to reset the counter, so that I don’t need to restart the service to get rid of the CRIT?

Cheers,
Roland.

Actually the server plugin does not store the highest connection count, but MySQL does.

The check you are referring to (mysql.connections) picks the following two values

Max_used_connections    1
max_connections         151

from the ouput of mysql ... -sN -e "show global status ; show global variables ;" and relates them to each other. In my case 1 of 151 is 0.66% and that’s what it shows. The WARN/CRIT levels default to 3 and 5.

Are you asking how to reset the counter in MySQL or which service are you talking about?
You may try mysqladmin flush-status to reset the counters, see the docs.

1 Like

Thank you very much - that was exactly what I needed to know.

By the way: I think it would be better, if the check would be WARN, if it happened in the past and only CRIT, if the max value is exceeded right now.
(if not by default, then at least as a possibility to configure it that way)

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.