Alert rules

This page contains a markdown version of the alert rules described in the mysql-operator repository.

See the source of truth on GitHub for the latest information, or an older version:

alert_rules/prometheus/metrics_alert_rules.yaml

MySQLExporter

Alert

Severity

Notes

MySQLDown

critical

MySQL instance is down.

MySQLTooManyConnections(>90%)

warning

MySQL instance is using > 90% of max_connections.
Consider checking the client application responsible for generating those additional connections.

MySQLHighThreadsRunning

warning

MySQL instance is actively using > 80% of max_connections.
Consider reviewing the value of the max-connections config parameter or allocate more resources to your database server.

MySQLHighPreparedStatementsUtilization(>80%)

warning

MySQL instance is using > 80% of max_prepared_stmt_count.
Too many prepared statements might consume a lot of memory.

MySQLSlowQueries

info

MySQL instance has a slow query.
Consider optimizing the query by reviewing its execution plan, then rewrite the query and add any relevant indexes.

MySQLInnoDBLogWaits

warning

MySQL instance has long InnoDB log waits.
MySQL InnoDB log writes might be stalling. Check I/O activity on your nodes to find the responsible process or query. Consider using iotop and the performance_schema.

MySQLRestarted

info

MySQL instance restarted.
MySQL restarted less than one minute ago. If the restart was unplanned or frequent, check Loki logs (e.g. error.log).