Skip to content

Alibaba Cloud Redis/Tair Standard Edition

Alibaba Cloud Redis/Tair Standard Edition metrics display, including CPU usage, memory usage, disk read/write, network traffic, accesses per second, etc.

Configuration

Install Func

It is recommended to activate the Guance integration - extension - hosted Func version.

If you deploy Func yourself, refer to Self-deployed Func

Enable Script

Note: Please prepare an Alibaba Cloud AK that meets the requirements in advance (for simplicity, you can directly grant global read-only permission ReadOnlyAccess)

Hosted Version Enable Script

  1. Log in to the Guance console
  2. Click on the 【Integration】 menu and select 【Cloud Account Management】
  3. Click 【Add Cloud Account】, choose 【Alibaba Cloud】, fill in the required information on the interface. If you have already configured cloud account information, skip this step.
  4. Click 【Test】, if the test succeeds, click 【Save】. If the test fails, check whether the related configuration information is correct and retest.
  5. In the 【Cloud Account Management】 list, you can see the added cloud accounts. Click the corresponding cloud account to enter the details page.
  6. On the cloud account detail page, click the 【Integrate】 button. Under the Not Installed list, find Alibaba Cloud Redis Standard Edition, click the 【Install】 button, and install it from the pop-up installation interface.

Manual Enable Script

  1. Log in to the Func console, click 【Script Market】, go to the official script market, and search for guance_aliyun_redis

  2. After clicking 【Install】, input the corresponding parameters: Alibaba Cloud AK ID, AK Secret, and account name.

  3. Click 【Deploy Start Script】, the system will automatically create a Startup script set and automatically configure the corresponding start scripts.

  4. After enabling, you can see the corresponding automatic trigger configuration in 「Management / Automatic Trigger Configuration」. Click 【Execute】 to immediately run once without waiting for the scheduled time. Wait a moment, then you can view the execution task records and corresponding logs.

We default collect some configurations, detailed see the Metrics section.

Metrics

After configuring Alibaba Cloud - Cloud Monitor, the default metric sets are as follows. You can collect more metrics through configuration Alibaba Cloud Cloud Monitor Metric Details

Metric Id Metric Name Dimensions Statistics Unit
StandardAvgRt Average Response Time userId,instanceId Average,Maximum us
StandardBlockedClients Blocked Client Connections userId,instanceId Average,Maximum Count
StandardConnectionUsage Connection Usage Rate userId,instanceId Average,Maximum %
StandardCpuUsage CPU Usage Rate userId,instanceId Average,Maximum %
StandardHitRate Hit Rate userId,instanceId Average,Maximum %
StandardIntranetIn Incoming Traffic userId,instanceId Average,Maximum KBytes/s
StandardIntranetInRatio Incoming Bandwidth Usage Rate userId,instanceId Average,Maximum %
StandardIntranetOut Outgoing Traffic userId,instanceId Average,Maximum KBytes/s
StandardIntranetOutRatio Outgoing Bandwidth Usage Rate userId,instanceId Average,Maximum %
StandardKeys Number of Keys in Cache userId,instanceId Average,Maximum Count
StandardMemoryUsage Memory Usage Rate userId,instanceId Average,Maximum %
StandardSyncDelayTime Multi-active Synchronization Latency userId,instanceId Average,Maximum seconds
StandardUsedConnection Used Connections userId,instanceId Average,Maximum Count
StandardUsedMemory Memory Usage userId,instanceId Average,Maximum Bytes
StandardUsedQPS Average Accesses Per Second userId,instanceId Average,Maximum Count

Objects

The object data structure of the collected Alibaba Cloud redis objects can be viewed under 「Infrastructure - Custom」

{
  "measurement": "aliyun_redis",
  "tags": {
    "name"            : "r-bp12xxxxxxx",
    "InstanceId"      : "r-bp12vxxxxxxxxx",
    "RegionId"        : "cn-hangzhou",
    "ZoneId"          : "cn-hangzhou-h",
    "InstanceClass"   : "redis.master.small.default",
    "EngineVersion"   : "5.0",
    "ChargeType"      : "PrePaid",
    "ConnectionDomain": "r-bp12vxxxxxxx.redis.rds.aliyuncs.com",
    "NetworkType"     : "VPC",
    "PrivateIp"       : "xxxxxx",
    "Port"            : "6379",
    "InstanceName"    : "xxx System",
    "InstanceType"    : "Redis",
    "InstanceStatus"  : "Normal"
  },
  "fields": {
    "Capacity"  : "1024",
    "EndTime"   : "2022-12-13T16:00:00Z",
    "CreateTime": "2021-01-11T09:35:51Z",
    "Accounts"  : "[{Account JSON Data}]",
    "message"   : "{Instance JSON Data}"
  }
}

Logs

Slow Queries

Prerequisites

Note: The code execution of this script depends on the collection of Redis instance objects. If Redis custom object collection has not been configured, the slow log script cannot collect slow log data.

Install Script

On top of the previous setup, you need to install a corresponding Redis Slow Query Log Collection Script

In 「Management / Script Market」, click and install the corresponding script package:

  • 「Guance Integration (Alibaba Cloud - Redis Slow Query Log Collection)」(ID: guance_aliyun_redis_slowlog)

After data synchronization, you can view the data in the 「Logs」 section of Guance.

An example of the reported data is as follows:

{
  "measurement": "aliyun_redis_slowlog",
  "tags": {
      "name"            : "r-bp1c4xxxxxxxofy2vm",
      "Account"         : "(null)",
      "IPAddress"       : "172.xx.x.201",
      "AccountName"     : "(null)",
      "DBName"          : "3",
      "NodeId"          : "(null)",
      "ChargeType"      : "PrePaid",
      "ConnectionDomain": "r-bpxxxxxxxxxxy2vm.redis.rds.aliyuncs.com",
      "EngineVersion"   : "4.0",
      "InstanceClass"   : "redis.master.small.default",
      "InstanceId"      : "r-bpxxxxxxxxxxxxxxx2vm",
      "InstanceName"    : "xx3.0-xx System",
      "NetworkType"     : "VPC",
      "Port"            : "6379",
      "PrivateIp"       : "172.xxx.xx.200",
      "RegionId"        : "cn-hangzhou",
      "ZoneId"          : "cn-hangzhou-h"
  },
  "fields": {
    "Command"    : "latency:eventloop",
    "ElapsedTime": 192000,
    "ExecuteTime": "2022-07-26T03:18:36Z",
    "message"    : "{Instance JSON Data}"
  }
}

Some parameter explanations are as follows:

Field Type Description
ElapsedTime int Execution duration, unit in milliseconds
ExecuteTime str Execution start time
IPAddress str Client's IP address

Note: Fields in tags, fields may change with subsequent updates.

Note: fields.message is a JSON serialized string.

Feedback

Is this page helpful? ×