Updated on 2025-07-23 GMT+08:00

Redis Monitoring

Introduction

A Redis monitor detects your database status, and automatically triggers traffic switching when the database is abnormal.

Table 1 Monitoring status description

Monitoring Status

Description

Green

The monitoring is normal.

Red

The monitoring is abnormal. Traffic switchover is automatically triggered (if enabled) when the status changes from normal to failed.

Yellow

The monitor initialization failed. The MAS process cannot detect the service database. In this case, confirm the configurations or contact O&M personnel.

Light gray

Monitor creation or configuration failed.

Dark gray

Invocation failed. The ETCD connection status is abnormal.

Prerequisites

  • A multi-active instance and the corresponding function module have been created.
  • Databases to be monitored have been created.

Creating a Redis Monitor

  1. Log in to the MAS console. On the Multi-Active Instances page, click an instance whose namespace type is Intra-city multi-active.
  2. Click the Monitor List tab and click Create Monitor.
  3. Configure the basic information, then click Next: Data Centers.

    Figure 1 Basic information configurations
    Table 2 Basic information parameters

    Parameter

    Description

    Monitor

    Select Redis Monitoring.

    Application

    Select an application.

    Monitor Name

    Customize the monitor name.

    Exception Notification

    By default, this option is disabled.

    If it is enabled, monitor and database exceptions will be sent to you in a timely manner. To enable this option, configure a secret key first.

    Subject

    If Exception Notification is enabled, select a subject from the drop-down list or click Add to create a new one.

    Monitoring

    The default value is Yes. If No, database exceptions will not be monitored.

    Automatic Switchover

    The default value is Yes. If No, automatic switchover of the databases will not be triggered.

    Routing Algorithm

    Select Single read/write, Local read, asynchronous dual write, or Single read, asynchronous dual write as required.

    Mode

    Select Normal (default), Sentinel, or Cluster based on Redis deployment.

    • Normal: includes single-node, master/standby, read/write splitting, Proxy Cluster; using the Redis PING command.
    • Sentinel: using the Redis PING command.
    • Cluster: using the Redis Cluster protocol. Detection is successful only if all slots are normal; otherwise, it fails.

  4. Configure the data centers, then click Next: Advanced.

    Figure 2 Data center configurations
    Table 3 Data center parameters

    Parameter

    Description

    Cloud

    Select the environment where the Redis databases are deployed. You can select a third-party data center for cross-cloud monitoring.

    Region

    Select the region where the Redis databases are deployed.

    AZs

    (Optional) Set this parameter for data centers 1 and 2 based on the AZs where the Redis databases are deployed.

    Connection Address

    Enter the connection address and port of the monitored Redis database.

    Password

    Enter the password of the monitored Redis database.

    Confirm Password

    Enter the password again.

  5. Configure the advanced settings, then click Next: Confirm.

    Figure 3 Advanced configurations
    Table 4 Advanced settings

    Parameter

    Description

    Retry Interval (ms)

    The interval of detection attempts, in milliseconds. Default value (recommended): 3000

    Value range: 1000 to 300000

    Database Access Timeout (ms)

    The database access timeout duration, over which the database access is considered failed, in milliseconds. Default value (recommended): 3000

    Value range: 3000 to 100000

    Monitoring Timeout (ms)

    The timeout duration before a monitor becomes abnormal.

    You are advised to use the default value 20000 (in milliseconds). Value range: 12000 to 1200000

    NOTE:

    Ensure that the time you specify here is longer than the time required for data center 1 to synchronize data to data center 2. Otherwise, the data in data center 2 may be incomplete.

  6. Confirm settings and click Create.

    If the created monitor is not normal, that is, its indicator is not green, its configurations or databases may be abnormal. In this case, rectify the fault.