Database Autonomy Service (DAS) provides the inspection and scoring feature to inspect and score the health status of your database instances on a regular basis. This can help you ensure the status of your database instances. This topic describes how to use the inspection and scoring feature.

Prerequisites

  • A database instance of one of the following types is created:
    • An ApsaraDB RDS for MySQL instance, a self-managed MySQL database instance, or an ApsaraDB PolarDB MySQL-compatible edition instance
    • An ApsaraDB for Redis instance
  • The database instance is connected to DAS and is in the Accessed state. For more information, see Connect an Alibaba Cloud database instance to DAS.

Procedure

  1. Log on to the DAS console.
  2. In the left-side navigation pane, click Inspection and Scoring.
  3. In the upper-right corner of the Instance Inspection and Scoring page, click Settings.
    9
  4. In the Enable Inspection and Scoring dialog box, select the engine that the database instance runs and click Confirm.
    3

Scoring rules

  • MySQL
    Item Description Sub-item Condition Deducted points
    CPU Utilization (cpuUsage) The average CPU utilization during a day. If an instance has multiple CPU cores, the system calculates the CPU utilization of each core and then calculates the average CPU utilization of all cores. Major 70% <= cpuUsage <= 80% 1 + (cpuUsage - 0.7) * 20
    Critical cpuUsage >= 80% min[3 + (cpuUsage - 0.8) * 30, 10]
    Memory Usage (memUsage) The average memory usage during a day. Major 80% <= memUsage <= 90% 1 - (memUsage - 0.8) * 20
    Critical memUsage > 0.9 min[(memUsage - 0.9) * 50, 10]
    Space Usage (Space Usage) The storage usage is calculated based on the following formula: Storage usage = Average used storage during a day/Total storage × 100% Available days availableDays <= 30 15 - availableDays/3
    The number of large tables bigTableCount > 0 min(bigTableCount, 15)
    Connection Usage (connectionRate) The connection usage is calculated based on the following formula: Connection usage = Average number of connections during a day/Maximum number of connections allowed at a point in time × 100% Major 70% <= connectionRate <= 80% 1
    Critical connectionRate > 80% 3
    IOPS Usage (iopsUsage) The IOPS usage is calculated based on the following formula: IOPS usage = Average IOPS during a day/Maximum IOPS allowed × 100% Major 70% < iopsUsage < 90% 3
    Critical iopsUsage > 90% 5
    ThreadRunning (threadRunning) The number of active sessions generated in one day. Major threadRunning > min(2 * cpuCores + 8,64) 3
    Critical threadRunning > min(4 * cpuCores + 8,96) 9
    Slow SQL Statements (slowSqlCount) The number of slow SQL statements generated in one day.
    Note You can click the number to view the five slow SQL statements that are most frequently executed.
    Minor 0 < slowSqlCount < 100 1 + (slowSqlCount - 10)/30
    Major 100 <= slowSqlCount < 500 4 + (slowSqlCount - 100)/30
    Critical slowSqlCount >= 500 min[18 + (slowSqlCount - 50)/30, 30)]
    SQL security audit (sqlInjectionCount) The number of high-risk SQL statements and the number of SQL injection attacks. High-risk SQL statements riskSqlCount > 0 min(riskSqlCount, 5)
    SQL injection sqlInjectionCount > 0 min(sqlInjectionCount, 5)
    Deadlock Indicates whether a deadlock occurs during a day. Yes Yes 3
  • Redis
    Item Description Sub-item Condition Deducted points
    CPU Utilization (cpuUsage) The average CPU utilization during a day. If an instance has multiple CPU cores, the system calculates the CPU utilization of each core and then calculates the average CPU utilization of all cores. Major 70% <= cpuUsage <= 80% 1 + (cpuUsage - 0.7) * 20
    Critical cpuUsage >= 80% min[3 + (cpuUsage - 0.8) * 30, 10]
    Memory Usage (memUsage) The average memory usage during a day. Major 80% <= memUsage <= 90% 1 + (memUsage - 0.8) * 20
    Critical memUsage > 0.9 min[(memUsage - 0.9) * 50, 10]
    Connection Usage (connectionRate) The connection usage is calculated based on the following formula: Connection usage = Average number of connections during a day/Maximum number of connections allowed at a point in time × 100% Major 70% <= connectionRate <= 80% 1
    Critical connectionRate > 80% 3
    Traffic usage (FlowRate) The traffic usage is calculated based on the following formula: Traffic usage = Average traffic during a day/Maximum traffic allowed at a point in time × 100% Major 80% <= FlowRate <= 85 (Both inbound traffic and outbound traffic count.) 1
    Critical flowRate > 85% 3
    Critical iopsUsage > 90% 5
    Hotkeys (HotKey) The information about hot keys appears. Yes Yes 3
    Slow SQL Statements (slowSqlCount) The total number of slow SQL statements generated in one day. If you click the number, you can view the five slow SQL statements that are most frequently executed. Minor 0 < slowSqlCount < 100 1 + (slowSqlCount - 10)/30
    Major 100 <= slowSqlCount < 500 4 + (slowSqlCount - 100)/30
    Critical slowSqlCount >= 500 min[18 + (slowSqlCount - 50)/30, 30)]

Related API operations

GetInstanceInspections