Working with Rules

The MySQL cartridge provides a comprehensive set of preconfigured rules designed to monitor various aspects of MySQL server performance and health. You can modify these rules, including changing default threshold values.

This section describes the following rules:


Connection and Authentication Rules

Authentication Errors

Alert if the number of authentication errors exceed a defined threshold as a percentage of total connection attempts.


Database Connectivity

Alert if a connection to the MySQL database cannot be established.


High Percentage of Connection Failures

Alert if the percentage of successful connections to the MySQL Server is too low (Fatal: 95%, Warning: 98%, Informational: 99%).


Non-Authentication Errors

Alert if non-authentication errors exceed a defined threshold as a percentage of total connection attempts.


Slow Connections

Alert if it is taking a long time to connect (Fatal: 10 seconds, Warning: 2 seconds, Informational: 1 second).


Used Connections Reaching Limit

Alert if the number of connections currently in use for a MySQL server is too high as a percentage of the maximum connections allowed.


Galera Cluster Rules

Galera Cluster Health

Alert if not all nodes in the Galera cluster are available.


Galera Node Disconnected

Alert if the MySQL server is disconnected from the Galera cluster.


Galera Node EVS Latency

Alert if the average EVS latency has been too high (Fatal: 5 seconds, Warning: 2.5 seconds, Informational: 1 second).


Galera Node Flow Control Paused

Alert if the percentage of time flow control has been paused on the MySQL server has been too high recently (Fatal: 50%, Warning: 35%, Informational: 25%).


Galera Node Not Ready

Alert if the MySQL server has not been ready to accept queries recently.


Galera Overloaded Receive Queue

Alert if the average size of the Galera received queue on the MySQL server has been too high.


Galera Overloaded Send Queue

Alert if the average size of the Galera send queue on the MySQL server has been too high.


InnoDB Cluster Rules

InnoDB Cluster Health

Alerts when at least one node is down with increasing severity when cluster stability is in jeopardy.


Performance and Query Rules

Blocked Transaction Alarm Generator

Alert if a transaction has been waiting for a long time to complete.


Concurrent Queries Running

Alert if there are too many active queries.


High Avg Wait Time for Statement

Alert if the average wait time for an instance of a statement is high compared to its previous average.


High Percentage of Compression Failures

Alert if the percentage of compression failures for a given page size is too high (Fatal: 95%, Warning: 98%, Informational: 99% successful compression operations).


High Percentage of Index Compression Failures

Alert if the percentage of compression failures for an index is too high (Fatal: 95%, Warning: 98%, Informational: 99% successful compression operations).


Inefficient Sort

Alert if any query sort operations are exhibiting inefficient behavior (Fatal: 2 ratio of merge passes, Warning: 1 ratio).


Long Running Query

Alert on any long running queries (Warning: 30 seconds query is waiting).


Query Waiting For Table Lock

Alert on queries waiting for a long time on a table lock.


Slow Query Average Execution Time

Alert if the average execution time for queries written to the slow query log is too long (Fatal: 7.5 seconds, Warning: 5 seconds, Informational: 2.5 seconds).


Slow Query Max Execution Time

Alert if the maximum execution time for queries written to the slow query log is too long (Fatal: 10 seconds, Warning: 7.5 seconds, Informational: 5 seconds).


Table Scans Excessive

Alert if the MySQL server does not appear to be using indexes efficiently (Fatal: 40 table scans, Warning: 20, Informational: 10).


Transaction Purge Lag

Alert if the Transaction Purge Lag is too high (Fatal: 1,500,000 transactions waiting, Warning: 1,000,000).


Unflushed Log Buffer

Alert if percentage of entries in the log buffer waiting to be flushed to disk is too high (Fatal: 50%, Warning: 30%).


Replication Rules

Replica Channel Lagging Behind Source

Alert if a replication slave is falling behind the master (Fatal: 30, Warning: 15, Informational: 5).


Replica I/O in Failed State

Alert if the Replica I/O State for the MySQL server is either reconnecting or waiting to reconnect after a disconnection event.


Replica I/O Thread Not Running

Alert if the Replica I/O Thread for a channel is not running.


Replica SQL Thread Not Running

Alert if the Replica SQL Thread for a channel is not running.


Replication Slave Connection Unavailable

Alert if a replication slave is unreachable by the Foglight Agent.


Replication Slave I/O in Failed State

Alert if a replication server is either reconnecting or waiting to reconnect after a disconnection event.


Replication Slave I/O Thread Not Running

Alert if the Slave IO Thread for a Replication Slave server is either not running or not connected to a replication master.


Replication Slave SQL Thread Not Running

Alert if the Slave SQL Thread for a Replication Slave server is not running.


Slave I/O in Failed State

Alert if the SlaveIOState for the MySQL server is either reconnecting or waiting to reconnect after a disconnection event.


Slave I/O Thread Not Running

Alert if the Slave IO Thread for the MySQL server is either not running or not connected to a replication master.


Slave SQL Thread Not Running

Alert if the Slave SQL Thread for a Slave server is not running.


Storage and Tablespace Rules

MySQL Server Running Out of Disk Space

Alert if the database server’s host will run out of disk space soon given the current database growth rate (Fatal: 15 days, Warning: 30 days, Informational: 60 days until storage is full).


Tablespace Utilization

Alert if the amount of tablespace left in an InnoDB database that does not have auto extend enabled is low (Fatal: 4MB remaining, Warning: 8MB remaining).


Tablespace Utilization - Basic Table Collection

Alert if the amount of tablespace left in an InnoDB database that does not have auto extend enabled is low.


Tablespace Utilization - Basic Table Collection - Purge Alarms

Purges alarms from Tablespace Utilization - Basic Table Collection if they have not been re-triggered in 4 hours.


Buffer and Cache Rules

InnoDB Buffer Pool Hit Rate

Alert if the InnoDB Buffer Pool hit rate is too low.


Key Buffer Hit Rate

Alert if the key buffer hit rate is too low.


Query Cache Hit Rate

Alert if the query cache hit rate is too low.


Query Cache Undersized

Alert if there are any query cache low memory prunes.


Thread Pool Hit Rate

Alert if the Thread Pool hit rate is too low.