Help Center/ Relational Database Service_RDS for MySQL/ Best Practices/ Suggestions on RDS for MySQL Metric Alarm Configurations
Updated on 2025-09-04 GMT+08:00

Suggestions on RDS for MySQL Metric Alarm Configurations

You can set alarm rules on Cloud Eye to customize the monitored objects and notification policies and keep track of the instance status. This topic describes how to configure RDS for MySQL metric alarm rules.

Creating a Metric Alarm Rule

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and a project.
  3. Click Service List. Under Management & Governance, click Cloud Eye.
  4. In the navigation pane, choose Alarm Management > Alarm Rules.
  5. Click Create Alarm Rule in the upper right corner.
  6. On the displayed page, configure required parameters.

    Figure 1 Configuring alarm rule information
    Table 1 Alarm rule information

    Parameter

    Description

    Name

    Alarm rule name. The system generates a random name, which you can modify.

    Description

    Description about the rule.

    Alarm Type

    Select Metric.

    Cloud product

    Select Relational Database Service - MySQL Instances.

    Resource Level

    Cloud product is recommended.

    Monitoring Scope

    • All resources: An alarm will be triggered if any resource of the current cloud product meets the alarm policy. To exclude resources that do not require monitoring, click Select Resources to Exclude.
    • Resource groups: An alarm will be triggered if any resource in the selected resource group meets the alarm policy.
    • Specific resources: Click Select Specific Resources to select resources.

    Method

    • Associate template: After an associated template is modified, the policies contained in this alarm rule to be created will be modified accordingly.

      You are advised to select Use existing template. The existing templates already contain three common alarm metrics: CPU usage, memory usage, and storage space usage.

    • Configure manually: Configure alarm policies manually.

    Template

    If you select Associate template for Method, you need to select a template.

    You can select a default alarm template or create a custom template.

    Alarm Policy

    If you select Configure manually for Method, you need to configure alarm policies.

    Whether to trigger an alarm depends on whether the metric data in consecutive periods reaches the threshold. For example, Cloud Eye triggers an alarm every 5 minutes if the average CPU usage of the monitored object is 80% or more for three consecutive 5-minute periods.

    NOTE:

    A maximum of 50 alarm policies can be added to an alarm rule. If any one of these alarm policies is met, an alarm is triggered.

    Alarm Severity

    The alarm severity can be Critical, Major, Minor, or Informational.

    Figure 2 Configuring alarm notification
    Table 2 Alarm notification

    Parameter

    Description

    Alarm Notification

    Whether to notify users when alarms are triggered. Notifications can be sent by email, text message, or HTTP/HTTPS message.

    Notification Recipient

    You can select a notification group or topic subscription as required.

    Notification Group

    Notification group the alarm notification is to be sent to.

    Notification Object

    Object the alarm notification is to be sent to. You can select the account contact or a topic.

    • The account contact is the mobile phone number and email address of the registered account.
    • A topic is used to publish messages and subscribe to notifications.

    Notification Window

    Cloud Eye sends notifications only within the notification window specified in the alarm rule.

    If Notification Window is set to 08:00-20:00, Cloud Eye sends notifications only within 08:00-20:00.

    Trigger Condition

    Condition for triggering an alarm notification. You can select Generated alarm (when an alarm is generated), Cleared alarm (when an alarm is cleared), or both.

    Enterprise Project

    Enterprise project that the alarm rule belongs to. Only users with the enterprise project permissions can view and manage the alarm rule.

    Tag

    A tag is a key–value pair. Tags identify cloud resources so that you can easily categorize and search for your resources.

  7. Click Create. The alarm rule is created.

    For details about how to create alarm rules, see Creating an Alarm Rule in the Cloud Eye User Guide.

Metric Alarm Configuration Suggestions

Table 3 Suggestions on RDS for MySQL metric alarm configurations

Metric ID

Metric Name

Metric Description

Threshold in Best Practices

Alarm Severity in Best Practices

Handling Suggestion

rds001_cpu_util

CPU Usage

CPU usage of the monitored object

Raw data > 80% for three consecutive periods

Major

  1. In emergencies, terminate real-time sessions and enable SQL throttling. For details, see Managing Real-Time Sessions and Creating a SQL Throttling Rule.
  2. If the CPU usage increases but workloads are not affected, rectify the fault by referring to High CPU Usage of RDS for MySQL Instances.
  3. If the CPU usage remains high due to increased workloads, upgrade the instance specifications or add read replicas. For details, see Changing a DB Instance Class and Creating an HA Read Replica.

rds002_mem_util

Memory Usage

Memory usage of the monitored object

Raw data > 90% for three consecutive periods

Major

  1. Rectify the fault by referring to High Memory Usage of RDS for MySQL Instances.
  2. If the memory usage is high due to increased workloads, upgrade the instance specifications or add read replicas. For details, see Changing a DB Instance Class and Creating an HA Read Replica.
  3. If an Out of Memory (OOM) problem occurs, handle it by referring to OOM Errors.

rds039_disk_util

Storage Space Usage

Storage space usage of the monitored object

Raw data > 80% for three consecutive periods

Major

  1. Check and optimize the storage usage by referring to Managing Storage Capacity.
  2. If too much data is stored, scale up the storage by referring to Scaling Up Storage Space.
  3. Enable storage autoscaling to prevent full storage.

rds072_conn_usage

Connection Usage

Percent of used MySQL connections to the total number of connections

Raw data > 80% for three consecutive periods

Major

  1. Evaluate the impact of increased connections on workloads and release unnecessary connections. For details, see What Do I Do If the Number of RDS Database Connections Reaches the Upper Limit?
  2. Set the maximum number of connections to an appropriate value. For details, see What Is the Maximum Number of Connections to an RDS DB Instance?

rds073_replication_delay

Real-Time Replication Delay

Real-time replication delay between standby DB instances or read replicas and primary DB instances, corresponding to seconds_behind_master

Raw data > 600s for three consecutive periods

Major

  1. Rectify the fault by referring to Primary/Standby Replication Delay Scenarios and Solutions.
  2. For details about the principles and some cases of primary/standby replication delay, see How Primary/Standby Replication Works, Automatic Recovery of Extended Primary/Standby Replication Delay, Abnormal Replication Between Primary and Standby RDS DB Instances, and Primary/Standby Replication Delay Increases Sharply and Then Decreases.

rds_mdl_lock_count

MDL Locks

Number of MDL locks

Set the threshold based on your workloads.

Major

  1. Check whether there are blocked sessions and waiting sessions by referring to Managing Locks & Transactions. If there are, terminate the sessions.
  2. For details about MDL locks, see MDL Views.
  3. For details about MDL lock cases, see RDS for MySQL Metadata Locks.

rds_long_transaction

Long Transaction

Maximum duration for starting a transaction

A complete long transaction is counted only when the BEGIN and COMMIT commands exist before and after the related operation commands, respectively.

Set the threshold as required.

Major

  1. Check for real-time sessions to identify any transactions that have been in the sleep state for an extended period without being committed. Optimize the service logic based on the session sources to ensure that idle transactions are committed in a timely manner. For details, see Managing Real-Time Sessions.
  2. End idle transactions for your instance.

rds075_avg_disk_ms_per_read

Disk Read Time

Average time required for each disk read in a specified period

Raw data > 50 ms for three consecutive periods

Major

  1. Check whether the instance has performance bottlenecks in CPUs, memory, or connections. If yes, resolve the bottlenecks based on the related suggestions.
  2. Observe the disk bandwidth metric. If the bandwidth reaches the upper limit, change the instance class to one with better disk performance. For details, see Changing a DB Instance Class, x86-based Instance Classes (Cloud Disk Storage), and DB Instance Storage Types.

rds076_avg_disk_ms_per_write

Disk Write Time

Average time required for each disk write in a specified period

Raw data > 50 ms for three consecutive periods

Major

  1. Check whether the instance has performance bottlenecks in CPUs, memory, or connections. If yes, resolve the bottlenecks based on the related suggestions.
  2. Observe the disk bandwidth metric. If the bandwidth reaches the upper limit, change the instance class to one with better disk performance. For details, see Changing a DB Instance Class, x86-based Instance Classes (Cloud Disk Storage), and DB Instance Storage Types.
Table 4 Suggestions on metric alarm configurations for RDS for MySQL database proxies

Metric ID

Metric Name

Metric Description

Threshold in Best Practices

Alarm Severity in Best Practices

Handling Suggestion

rds001_cpu_util

CPU Usage

CPU usage of the monitored object

Raw data > 75% for three consecutive periods

Major

Upgrade the proxy specifications or add proxy nodes. For details, see Changing the Instance Class of a DB Proxy Instance and Changing the Number of Proxy Nodes.