Collect host_cache metrics, .e.g COUNT_HOST_BLOCKED_ERRORS
Problem
We have seen various issues in our logs looking like this:
Error: ER_HOST_IS_BLOCKED: Host '10.10.5.115' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'
We would like to have metrics and possibly alert on this.
The following query returns information about the hosts:
SELECT * FROM performance_schema.host_cache WHERE IP = '10.10.5.115'
We're primarily interested in COUNT_HOST_BLOCKED_ERRORS.
Seems like some useful data, exposing per-IP would probably be too much cardinality,
We would likely want to sum up the errors like this:
SELECT
sum(COUNT_HOST_BLOCKED_ERRORS) AS blocked_errors_total
FROM performance_schema.host_cache
Yes, I was thinking the same after posting the feature request. Aggregating this should be good enough.
On Thu, 1 Apr 2021 at 7:45 pm, Ben Kochie @.***> wrote:
Seems like some useful data, exposing per-IP would probably be too much cardinality,
We would likely want to sum up the errors like this:
SELECT sum(COUNT_HOST_BLOCKED_ERRORS) AS blocked_errors_total FROM performance_schema.host_cache
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/prometheus/mysqld_exporter/issues/540#issuecomment-811754482, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACYNPTBMY34PDQ37GHMQL3TGQXELANCNFSM42F2A2DA .