Set up threshold-based alarms for MySQL instances and databases so Cloudmon notifies your team or triggers automated remediation when a metric breaches its defined limit.
MySQL monitoring in Cloudmon covers the full instance hierarchy: the MySQL server instance at the top level and individual databases within that instance. Alarm rules can be configured at the instance level for server-wide metrics such as connections, query performance, and replication health, and at the database level for storage and per-database activity metrics.
There are two ways to configure alarm rules for MySQL databases:
Each alarm is built around a simple IF/THEN model, where you select a metric, set a threshold, and define what happens when it is breached. Learn more.
Below are recommended alarm configurations for the most common MySQL monitoring scenarios:
| Use Case | Entity Level | Metric | Suggested Threshold | Why |
| Connection pool nearing exhaustion | Instance | Active Connections | Above 90% of max connections for 2 intervals | When MySQL reaches its connection limit, new connection attempts fail with "Too many connections". Catching this early identifies connection leaks or sudden load spikes before applications start returning errors to users. |
| Slow query rate increasing | Instance | Slow Queries per second | Above 5 for 3 intervals | A rising slow query rate indicates missing indexes, locking contention, or a problematic query introduced by a recent code deployment that is degrading overall database performance. |
| Replication lag growing | Instance | Replication Lag | Above 30 seconds for 2 intervals | Replication lag means read replicas are serving stale data. High lag can cause data consistency issues for read-heavy applications and make failover unreliable if the replica falls too far behind the primary. |
| InnoDB buffer pool pressure | Instance | Buffer Pool Utilisation | Above 95% for 3 intervals | When the InnoDB buffer pool is full, MySQL evicts cached pages more aggressively, increasing disk I/O and degrading query performance. Sustained high utilisation indicates the buffer pool size needs to be increased. |
| Instance uptime reset unexpectedly | Instance | Uptime | Below previous value for 1 interval | An unexpected MySQL restart can indicate a crash caused by a memory issue, a corrupted table, or an OOM kill by the OS. Immediate alerting on uptime reset allows the team to investigate before the cause is lost from logs. |
| Database storage growing rapidly | Database | Database Size | Above expected baseline for 2 intervals | Rapid growth in a specific database can indicate a runaway logging process, unbounded table growth, or missing purge jobs that will eventually fill the disk and take the entire MySQL instance offline. |
Once saved, all triggers for a MySQL entity are listed in the Triggers table under the Alarm Rule section in that entity's Settings. Each row shows the trigger title, alarm severity, notification configuration, and whether a script is set to run. Triggers can be edited or deleted at any time using the action icons on the right.
To apply consistent alarm coverage across all MySQL instances without configuring each one individually, save the rule as a reusable template under Settings → Configurations → Alarm Rules and associate it to a group.