All Products
Search
Document Center

Database Autonomy Service:Anomaly detection

Last Updated:Nov 19, 2024

Anomaly detection is a major consideration in routine O&M of databases. Database Autonomy Service (DAS) provides the anomaly detection feature to detect exceptions 24/7 based on machine learning and fine-grained monitoring data. This detection mechanism allows DAS to detect database exceptions faster than traditional threshold-based alerting mechanisms. This topic describes the benefits of the anomaly detection feature and how to view the detection results.

Prerequisites

  • The database instance that you want to manage is of one of the types described in the following table.

    Database

    Region

    • ApsaraDB RDS for MySQL

    • ApsaraDB MyBase for MySQL

    China (Hangzhou), China (Shanghai), China (Shenzhen), China (Heyuan), China (Guangzhou), China (Qingdao), China (Beijing), China (Zhangjiakou), China (Hohhot), China (Ulanqab), China (Nanjing - Local Region), China (Fuzhou - Local Region), China (Chengdu), China (Zhengzhou - Local Region), China (Hong Kong), Japan (Tokyo), South Korea (Seoul), Singapore, Malaysia (Kuala Lumpur), Indonesia (Jakarta), Philippines (Manila), Thailand (Bangkok), UAE (Dubai), SAU (Riyadh - Partner Region), Germany (Frankfurt), US (Silicon Valley), US (Virginia), and UK (London)

    ApsaraDB RDS for PostgreSQL

    China (Hangzhou), China (Shanghai), China (Shenzhen), China (Heyuan), China (Guangzhou), China (Qingdao), China (Beijing), China (Zhangjiakou), China (Hohhot), China (Ulanqab), China (Chengdu), China (Hong Kong), Japan (Tokyo), Singapore, Malaysia (Kuala Lumpur), Indonesia (Jakarta), Philippines (Manila), UAE (Dubai), Germany (Frankfurt), US (Silicon Valley), US (Virginia), and UK (London)

    ApsaraDB RDS for SQL Server

    China (Hangzhou), China (Shanghai), China (Shenzhen), China (Heyuan), China (Qingdao), China (Beijing), China (Zhangjiakou), China (Hohhot), China (Ulanqab), China (Chengdu), China (Hong Kong), Japan (Tokyo), Singapore, Malaysia (Kuala Lumpur), Indonesia (Jakarta), UAE (Dubai), Germany (Frankfurt), US (Silicon Valley), US (Virginia), and UK (London)

    PolarDB for MySQL Standard Edition and Cluster Edition

    China (Hangzhou), China (Shanghai), China (Shenzhen), China (Heyuan), China (Guangzhou), China (Qingdao), China (Beijing), China (Zhangjiakou), China (Hohhot), China (Ulanqab), China (Chengdu), China (Hong Kong), Japan (Tokyo), Singapore, Malaysia (Kuala Lumpur), Indonesia (Jakarta), Philippines (Manila), Germany (Frankfurt), US (Silicon Valley), US (Virginia), and UK (London)

    Tair (Redis OSS-compatible)

    • Redis Open-Source Edition instances

    • Tair (Enterprise Edition) DRAM-based instances

    China (Hangzhou), China (Shanghai), China (Shenzhen), China (Heyuan), China (Guangzhou), China (Qingdao), China (Beijing), China (Zhangjiakou), China (Hohhot), China (Chengdu), China (Hong Kong), Japan (Tokyo), South Korea (Seoul), Singapore, Malaysia (Kuala Lumpur), Indonesia (Jakarta), Philippines (Manila), Thailand (Bangkok), UAE (Dubai), SAU (Riyadh - Partner Region), Germany (Frankfurt), US (Silicon Valley), US (Virginia), and UK (London)

    Tair (Enterprise Edition) persistent memory-optimized and ESSD/SSD-based instances

    China (Hangzhou), China (Shanghai), China (Shenzhen), China (Beijing), China (Zhangjiakou), China (Hong Kong), Singapore, Germany (Frankfurt), and US (Virginia)

  • The database instance is connected to DAS and is in the Normal Access state.

    Note

    For more information about how to connect a database instance to DAS, see Connect an Alibaba Cloud database instance to DAS.

Benefits

The anomaly detection feature detects exceptions 24/7 based on machine learning and fine-grained monitoring data. Compared with rule-based or threshold-based alerting, you can detect database exceptions in a more timely manner.

Item

Traditional solution

DAS anomaly detection

Method

Rule-based or threshold-based

AI-based

Monitored objects

Metrics

A wide range of objects, such as metrics, SQL statements, logs, locks, and O&M events

Latency

From 5 minutes to one or more days

Quasi-real-time

Detection method

Fault-driven

Exception-driven

Periodic detection

Not supported

Automatic and periodic

Adaptability

Not supported

Adaptive to services that have different characteristics

Prediction

Not supported

Supported

View anomaly detection results

In the autonomy center, you can view events that are detected within a specific time range.

  1. Log on to the DAS console.

  2. In the left-side navigation pane, click Instance Monitoring.

  3. On the page that appears, find the database instance that you want to manage and click the instance ID. The instance details page appears.

  4. On the instance details page, click Autonomy Center in the left-side navigation pane.

  5. Specify a time range to view the exception detection results within the time range.

Enable event subscription

After you enable the event subscription feature for a database instance, DAS sends you a notification every time a subscribed event is triggered. You can specify a notification method such as text messages based on your business requirements. For more information, see Event subscription.

Note

To receive notifications about anomaly events, set the urgency level of the events to Warning. You can specify an urgency level based on your business requirements.

FAQ

Q: How is the change rate of the related metrics in the Analysis of Abnormal Metrics section of the Anomaly Snapshots tab of the Anomaly Detection of Metrics (Time Series Anomaly Detection) event calculated?异常指标

A: Change rate of a metric = Actual metric value/Predicated metric value. DAS uses the data at a granularity of hours of a database instance in a specific period of time to predict the metric value of the database instance in the current time range. The predicted metric value is used as a baseline and compared with the actual metric value. This way, the change rate of the metric is calculated.

References

You can use the autonomy features of DAS to allow DAS to automatically handle database exceptions. For more information, see the following topics: