Configure alert rules

更新时间:
复制 MD 格式

Database Autonomy Service (DAS) provides an alert service that lets you create custom alert rules. When a database instance triggers an alert rule, DAS automatically sends an alert. This topic shows you how to configure and manage alert rules in DAS.

Create an alert rule

Important
  • The DAS alert types have been updated. The Autonomy Events alert type has been added, and Event Alert are no longer supported. Rules that you have already configured are retained. When you create new rules, you can select only Threshold Alert and Autonomy Eventss.

  • Legacy event subscriptions (alerts with an Type of Event Alert) trigger alerts for all event types of autonomy events. If you need to modify the event types for alerts from a legacy event subscription, you can migrate the legacy event subscription to the new version and then perform the operation.

  1. Log in to the DAS console.

  2. In the left-side navigation pane, choose Tools > Alert Service > Alert Rules.

  3. On the Alert Rules page, click Add Rule in the upper-right corner.

  4. In the Add Rule dialog box, configure the following parameters and click OK.

    Parameter

    Description

    Rule Name

    Enter a name for the alert rule.

    Type

    Select the alert type.

    • Threshold Alert: Sends an alert notification when the value of an alert item crosses a specified threshold. For a list of supported alert items, see the alert items in this topic.

    • Autonomy Events: Configure autonomy events to send alert notifications.

    Description

    Configure the Threshold Alert rule execution method.

    Note
    • When the Type is Threshold Alert, you need to configure this parameter.

    • The alert detection interval is one minute.

    Event Type

    Specify the autonomy event types that trigger alerts. The following types are supported:

    • Auto scaling event

    • Throttling event

    • SQL optimization

    • Storage optimization

    • Metric exception

    • Slow log data exception (This feature is in beta.)

    Note

    When the Type is Autonomy Events, you must configure this parameter.

    Alert Interval

    The interval for resending notifications for an active alert.

    Effective Time

    The time period during which the alert rule is active.

    Alert Level

    Select the alert severity.

    Notification Method

    Select the notification method. Options include text message, webhook, and email.

    Note

    Webhooks are supported for DingTalk, WeCom, Lark, and Application Real-Time Monitoring Service (ARMS).

  5. After creating the alert rule, proceed to alert configuration.

Manage alert rules

  1. Log on to the DAS console.

  2. In the left-side navigation pane, choose Tools > Alert Service > Alert Rules.

  3. On the Alert Rules page, you can manage your alert rules.

    In the Actions column for an alert rule, you can:

    • View: See the details and alert history of the alert rule.

    • Modify: Modify the alert rule. For details about its configuration parameters, see the Alert Rule Configuration Parameters section in this topic.

    • Disable: Deactivate the alert rule.

    • Delete: Remove the alert rule.

    Important

    Editing, disabling, or deleting an alert rule affects all alert templates that contain the rule. Proceed with caution.

Alert item

Important

This alert metric only applies to Alibaba Cloud database instances.

MySQL

Alert metric

Unit

Description

MySQL disk usage

%

The percentage of disk space in use.

MySQL CPU utilization

%

The CPU utilization of the MySQL service process. The maximum value is 100% for ApsaraDB instances.

MySQL IOPS utilization

%

The percentage of I/O operations per second (IOPS) in use.

MySQL memory usage

%

The percentage of total operating system memory used by the MySQL instance.

MySQL active sessions

Count

The number of active sessions.

MySQL transactions per second

Count/s

The average number of transactions per second.

MySQL requests per second

Count/s

The average number of requests per second.

MySQL DELETE statements per second

Count/s

The average number of DELETE statements executed per second.

MySQL INSERT statements per second

Count/s

The average number of INSERT statements executed per second.

MySQL INSERT_SELECT statements per second

Count/s

The average number of INSERT_SELECT statements executed per second.

MySQL REPLACE statements per second

Count/s

The average number of REPLACE statements executed per second.

MySQL REPLACE_SELECT statements per second

Count/s

The average number of REPLACE_SELECT statements executed per second.

MySQL SELECT statements per second

Count/s

The average number of SELECT statements executed per second.

MySQL UPDATE statements per second

Count/s

The average number of UPDATE statements executed per second.

MySQL full table scans per second

Count/s

The number of full table scans executed per second.

MySQL tables opened

Count

The number of open tables.

MySQL files opened

Count

The number of open files.

MySQL rows sorted per second

Count/s

The number of rows sorted per second.

MySQL secondary node replication delay

s

The replication lag of the secondary node.

MySQL InnoDB average rows deleted per second

Count/s

The average number of rows deleted from InnoDB tables per second.

MySQL InnoDB average rows inserted per second

Count/s

The average number of rows inserted into InnoDB tables per second.

MySQL InnoDB average rows read per second

Count/s

The average number of rows read from InnoDB tables per second.

MySQL InnoDB average rows updated per second

Count/s

The average number of rows updated in InnoDB tables per second.

MySQL InnoDB pages read from Buffer Pool per second

Count/s

The average number of logical reads from the InnoDB Buffer Pool per second.

MySQL InnoDB pages written to Buffer Pool per second

Count/s

The average number of pages written to the InnoDB Buffer Pool per second.

MySQL InnoDB Buffer Pool dirty page ratio

%

The percentage of dirty pages in the InnoDB Buffer Pool. Formula: Innodb_buffer_pool_pages_dirty / Innodb_buffer_pool_pages_data × 100%.

MySQL InnoDB Buffer Pool read cache hit ratio

%

The percentage of read requests served from the InnoDB Buffer Pool. Formula: (Innodb_buffer_pool_read_requests - Innodb_buffer_pool_reads) / Innodb_buffer_pool_read_requests × 100%.

MySQL InnoDB table average row lock waits

Count

The average number of waits for a row lock on an InnoDB table.

MySQL InnoDB table maximum row lock wait time

ms

The maximum time spent waiting for a row lock on an InnoDB table.

MySQL instance total space usage

MB

The total disk space used by the MySQL instance.

PolarDB for MySQL

Alert metric

Unit

Description

PolarDB for MySQL disk usage

%

The percentage of disk space used.

PolarDB for MySQL service process CPU utilization

%

The CPU utilization of the service process. A value of 200% indicates that two CPU cores are used.

PolarDB for MySQL IOPS utilization

%

The utilization of I/O operations per second (IOPS).

PolarDB for MySQL instance memory usage

%

The instance's memory usage as a percentage of the operating system's total memory.

PolarDB for MySQL active sessions

Count

The number of active sessions.

PolarDB for MySQL transactions per second

Per Second

Calculated by using the formula: (Com_commit + Com_rollback) / Uptime.

PolarDB for MySQL requests per second

Per Second

Calculated by using the formula: Queries / Uptime.

PolarDB for MySQL DELETE statements per second

Per Second

The average number of DELETE statements executed per second.

PolarDB for MySQL INSERT statements per second

Per Second

The average number of INSERT statements executed per second.

PolarDB for MySQL INSERT_SELECT statements per second

Per Second

The average number of INSERT_SELECT statements executed per second.

PolarDB for MySQL REPLACE statements per second

Per Second

The average number of REPLACE statements executed per second.

PolarDB for MySQL REPLACE_SELECT statements per second

Per Second

The average number of REPLACE_SELECT statements executed per second.

PolarDB for MySQL SELECT statements per second

Per Second

The average number of SELECT statements executed per second.

PolarDB for MySQL UPDATE statements per second

Per Second

The average number of UPDATE statements executed per second.

PolarDB for MySQL Multi-DELETE statements per second

Per Second

The average number of Multi-DELETE statements executed per second.

PolarDB for MySQL Multi-UPDATE statements per second

Per Second

The average number of Multi-UPDATE statements executed per second.

PolarDB for MySQL InnoDB rows deleted per second

Per Second

The average number of rows deleted from InnoDB tables per second.

PolarDB for MySQL InnoDB rows inserted per second

Per Second

The average number of rows inserted into InnoDB tables per second.

PolarDB for MySQL InnoDB rows read per second

Per Second

The average number of rows read from InnoDB tables per second.

PolarDB for MySQL InnoDB rows updated per second

Per Second

The average number of rows updated in InnoDB tables per second.

Redis

Alert metric

Unit

Description

Redis memory utilization

%

The percentage of memory used by the Redis instance.

Redis average response time

μs

The average response time for a Redis command.

Redis process CPU utilization

%

The percentage of CPU time used by the Redis process.

Redis network read rate

KB/s

The rate of data read from the network.

Redis network write rate

KB/s

The rate of data written to the network.

Redis network read utilization

%

The percentage of network read bandwidth in use.

Redis network write utilization

%

The percentage of network write bandwidth in use.

PostgreSQL

Metric

Unit

Description

PostgreSQL process CPU utilization

%

The percentage of CPU used by the PostgreSQL process.

PostgreSQL active sessions

Count

The number of currently active connections.

PostgreSQL IOPS utilization

%

The percentage of IOPS used.

PostgreSQL disk utilization

%

The percentage of disk space used.

PolarDB for PostgreSQL

Metric

Unit

Description

PolarDB for PostgreSQL CPU utilization

%

The percentage of CPU capacity in use.

PolarDB for PostgreSQL memory usage

%

The percentage of memory in use.

PolarDB for PostgreSQL active sessions

Count

The number of active database connections.

PolarDB for PostgreSQL total IOPS

IOPS

The total number of read and write operations per second.

Historical alert metrics

Note

DAS began adding support for new alert metrics on March 16, 2023. Alerts configured before this date are now classified as historical alert metrics. These historical metrics can no longer be configured and are being deprecated. We recommend using the new alert metrics.

Alert metrics

Event alerting

Alert metric

Number of occurrences

Database Disconnected

1, 3, 5, 7, or 10 consecutive times.

Replication Interruption of MySQL Instance

1, 3, 5, 7, or 10 consecutive times.

Threshold alerting

Important

ApsaraDB instances and self-managed databases with direct connections use the centralized-mode DBGateway.

Alert metric

Threshold unit

Centralized-mode DBGateway

Host-mode DBGateway

Number of occurrences

Host CPU utilization

%

Not supported

Supported

1, 3, 5, 7, or 10 consecutive times.

Host LOAD_1min

None

Not supported

Host memory usage

%

Not supported

Host network sent bandwidth usage

%

Not supported

Host network received bandwidth usage

%

Not supported

Host root partition disk usage

%

Not supported

MySQL active sessions

Count

Supported

MySQL connections

Count

Supported

MySQL replication delay

s

Supported

MySQL cache hit ratio

%

Supported

MySQL slow SQL statements per hour

Count

Supported

MySQL data storage usage

%

Supported

MySQL log storage usage

%

Supported

Redis client connections

Count

Supported

Redis cache hit ratio

%

Supported

Redis memory fragmentation ratio

%

Supported

PostgreSQL IOPS usage

%

Supported

PostgreSQL iNode usage

%

Supported

PostgreSQL space usage

%

Supported

PostgreSQL TPS

Count

Supported

PostgreSQL connection usage

%

Supported

PostgreSQL average active connections per CPU

Count

Supported

PostgreSQL table bloat

Count

Supported

PostgreSQL CPU utilization

%

Not supported

PostgreSQL memory usage

%

Supported

MongoDB connections

Count

Supported

MongoDB cache usage

%

Supported

MongoDB current queued operations

Count

Supported

MongoDB cache dirty data percentage

%

Supported

MongoDB slow queries per hour

Count

Not supported

Not supported

N/A

FAQ

  • Why am I receiving event alerts I did not configure?

    Your database instance may have a legacy event subscription. We recommend that you migrate the legacy event subscription to a new event subscription.

  • How do I migrate a legacy event subscription to a new event subscription?

    Configure the autonomy event alerts you need for the database instance. The system automatically migrates the event subscription to a new event subscription. The system no longer sends alerts for unconfigured autonomy events.

    Note

    If you do not need any autonomy event alerts, first configure an autonomy event alert of any type to overwrite the legacy event subscription for the database instance. After you complete the configuration, wait for 15 minutes, and then disassociate the alert template from the database instance.