View CLB monitoring data

Updated at:
Copy as MD

If you encounter network connectivity issues such as request timeout or throttling with a Classic Load Balancer (CLB) instance, or if you need to understand its load and performance, use CloudMonitor to view the instance's operational status and metrics. You can view this data through the console, an API, or an SDK.

Prerequisites

A CLB instance must be created and have at least one listener. For more information, see the following topics:

View monitoring data in the console

  1. Log on to the CLB console.

  2. In the top navigation bar, select the CLB instance's region.

  3. On the Instances page, find the target instance and use one of the following methods to view its monitoring information.

    • Method 1: In the Monitoring column, click monitor. In the Monitoring Information panel, click the Instances or Listeners tab.

    • Method 2: Click the instance ID. On the Instance Details tab, click the Monitoring tab. Then, click the Instances or Listeners tab.

    On the Instances tab, click the Bandwidth/Traffic sub-tab to view the Data Processed metric for the CLB instance's requests and responses.

    You can set a time range for the chart by specifying the Time. Turn on Auto Refresh to update the monitoring data every minute.

The following table describes the supported monitoring metrics.

Metric

Description

Traffic

  • Inbound traffic: Traffic from external requests to the load balancer.

  • Outbound traffic: Traffic from the load balancer to external services.

Packets

  • Inbound packets: The number of request packets the load balancer receives per second.

  • Outbound packets: The number of packets the load balancer sends per second.

Concurrent Connections

  • Active connections: All TCP connections in the ESTABLISHED state. If you use persistent connections, multiple file requests can be sent over a single connection.

  • Inactive connections: All TCP connections that are not in the ESTABLISHED state. On both Windows and Linux servers, you can run the netstat -an command to view these connections.

  • Maximum concurrent connections: The total number of established TCP connections.

New Connections

The average number of new connections from clients to the load balancer per collection period.

Dropped Traffic

  • Inbound traffic dropped: The rate at which inbound traffic is dropped per second.

  • Outbound traffic dropped: The rate at which outbound traffic is dropped per second.

Dropped Packets

  • Inbound packets dropped: The number of inbound packets dropped per second.

  • Outbound packets dropped: The number of outbound packets dropped per second.

Dropped Connections

The number of connections dropped per second.

The following metrics are specific to Layer 7 (HTTP/HTTPS) listeners.

Layer-7 QPS

The number of HTTP or HTTPS requests processed per second.

Response Time (Listener)

The average response time of the load balancer.

Layer 7 2xx/3xx/4xx/5xx/other status codes

The number of HTTP response codes returned by the listener.

Layer 7 upstream code 4xx/5xx

The number of HTTP response codes returned by the backend server.

Response Time (Server)

The average response time of the backend server.

View monitoring data by using an API

You can use the CloudMonitor API to view monitoring metrics and detailed data for a CLB instance.

image

To view monitoring data by using an API:

  1. Query the namespace. Call the DescribeProjectMeta operation to query the namespace of CLB in CloudMonitor.

  2. Optional: View available metrics. Call the DescribeMetricMetaList operation to query the descriptions of available time-series metrics in CloudMonitor. For more information, see CLB monitoring.

  3. Query the monitoring data for a specific metric.

    • Call the DescribeMetricLast operation to query the latest monitoring data for a specific CLB monitoring object.

    • Call the DescribeMetricList operation to query the time-series data of a CLB monitoring object over a specific time range.

DescribeProjectMeta

Call the DescribeProjectMeta operation to query the namespace of CLB in CloudMonitor.

  1. Log on to OpenAPI Explorer.

  2. Set the Labels parameter to [{"name":"product","value":"SLB"}] and keep the default values for other parameters. The Labels parameter filters resources by product tag.

    Sample request

    http(s)://[Endpoint]/?Action=DescribeProjectMeta
    &Labels=[{"name":"product","value":"SLB"}]
    &<common request parameters>
  3. From the response, obtain the value of the Namespace parameter for the CLB instance in CloudMonitor. The value is acs_slb_dashboard.

    Sample response

    {
        "PageSize": 30, 
        "RequestId": "75B895A2-62A4-411E-871C-0EED97CC0D26", 
        "PageNumber": 1, 
        "Total": 1, 
        "Resources": {
            "Resource": [
                {
                    "Description": "Server Load Balancer", 
                    "Labels": "[{\"name\":\"product\",\"value\":\"SLB\"},{\"name\":\"productCategory\",\"value\":\"slb\"},{\"name\":\"groupFlag\",\"value\":\"true\"},{\"name\":\"cnName\",\"value\":\"Server Load Balancer\"},{\"name\":\"enName\",\"value\":\"Server Load Balancer\"}]", 
                    "Namespace": "acs_slb_dashboard"
                }
            ]
        }, 
        "Code": 200, 
        "Success": true
    }

DescribeMetricMetaList

Call the DescribeMetricMetaList operation to query the descriptions of the time-series metrics available in CloudMonitor.

  1. Log on to OpenAPI Explorer.

  2. Set the Namespace parameter to acs_slb_dashboard and keep the default values for other parameters.

    Sample request

    http(s)://[Endpoint]/?Action=DescribeMetricMetaList
    &Namespace=acs_slb_dashboard
    &<common request parameters>
  3. In the response, find the time-series metrics for the load balancer. For example, check for the Layer-7 QPS metric.

    Sample response

    {
        "TotalCount": 53, 
        "RequestId": "789846B4-56FC-4681-998C-5B7DBDFBE28F", 
        "Resources": {
            "Resource": [
                {
                    "MetricName": "ActiveConnection", 
                    "Periods": "60,300", 
                    "Description": "The current number of active connections on the port.", 
                    "Dimensions": "userId,instanceId,port,protocol", 
                    "Labels": "[{\"name\":\"alertUnit\",\"value\":\"Count\"},{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"metricCategory\",\"value\":\"port\"},{\"name\":\"is_alarm\",\"value\":\"true\"}]", 
                    "Unit": "Count", 
                    "Statistics": "Average,Minimum,Maximum", 
                    "Namespace": "acs_slb_dashboard"
                }, 
                {
                    "MetricName": "DropConnection", 
                    "Periods": "60,300", 
                    "Description": "", 
                    "Dimensions": "userId,instanceId,port,protocol", 
                    "Labels": "[{\"name\":\"alertUnit\",\"value\":\"Count/Second\"},{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"metricCategory\",\"value\":\"port\"},{\"name\":\"is_alarm\",\"value\":\"true\"}]", 
                    "Unit": "Count/s", 
                    "Statistics": "Average,Minimum,Maximum", 
                    "Namespace": "acs_slb_dashboard"
                }, 
                {
                    "MetricName": "DropPacketRX", 
                    "Periods": "60,300", 
                    "Description": "", 
                    "Dimensions": "userId,instanceId,port,protocol", 
                    "Labels": "[{\"name\":\"alertUnit\",\"value\":\"Count/Second\"},{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"metricCategory\",\"value\":\"port\"},{\"name\":\"is_alarm\",\"value\":\"true\"}]", 
                    "Unit": "Count/s", 
                    "Statistics": "Average,Minimum,Maximum", 
                    "Namespace": "acs_slb_dashboard"
                }, 
                {
                    "MetricName": "DropPacketTX", 
                    "Periods": "60,300", 
                    "Description": "", 
                    "Dimensions": "userId,instanceId,port,protocol", 
                    "Labels": "[{\"name\":\"alertUnit\",\"value\":\"Count/Second\"},{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"metricCategory\",\"value\":\"port\"},{\"name\":\"is_alarm\",\"value\":\"true\"}]", 
                    "Unit": "Count/s", 
                    "Statistics": "Average,Minimum,Maximum", 
                    "Namespace": "acs_slb_dashboard"
                }, 
                {
                    "MetricName": "DropTrafficRX", 
                    "Periods": "60,300", 
                    "Description": "", 
                    "Dimensions": "userId,instanceId,port,protocol", 
                    "Labels": "[{\"name\":\"alertUnit\",\"value\":\"bits/s\"},{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"metricCategory\",\"value\":\"port\"},{\"name\":\"is_alarm\",\"value\":\"true\"}]", 
                    "Unit": "bits/s", 
                    "Statistics": "Average,Minimum,Maximum", 
                    "Namespace": "acs_slb_dashboard"
                }, 
                {
                    "MetricName": "DropTrafficTX", 
                    "Periods": "60,300", 
                    "Description": "", 
                    "Dimensions": "userId,instanceId,port,protocol", 
                    "Labels": "[{\"name\":\"alertUnit\",\"value\":\"bits/s\"},{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"metricCategory\",\"value\":\"port\"},{\"name\":\"is_alarm\",\"value\":\"true\"}]", 
                    "Unit": "bits/s", 
                    "Statistics": "Average,Minimum,Maximum", 
                    "Namespace": "acs_slb_dashboard"
                }, 
                {
                    "MetricName": "GroupTrafficRX", 
                    "Periods": "60", 
                    "Description": "", 
                    "Dimensions": "groupId", 
                    "Labels": "[{\"name\":\"alertUnit\",\"value\":\"bits/s\"},{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"metricCategory\",\"value\":\"groupId\"},{\"name\":\"is_alarm\",\"value\":\"true\"}]", 
                    "Unit": "bits/s", 
                    "Statistics": "Average,Minimum,Maximum,Sum", 
                    "Namespace": "acs_slb_dashboard"
                }, 
                {
                    "MetricName": "GroupTrafficTX", 
                    "Periods": "60", 
                    "Description": "", 
                    "Dimensions": "groupId", 
                    "Labels": "[{\"name\":\"alertUnit\",\"value\":\"bits/s\"},{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"metricCategory\",\"value\":\"groupId\"},{\"name\":\"is_alarm\",\"value\":\"true\"}]", 
                    "Unit": "bits/s", 
                    "Statistics": "Average,Minimum,Maximum,Sum", 
                    "Namespace": "acs_slb_dashboard"
                }, 
                {
                    "MetricName": "HeathyServerCount", 
                    "Periods": "60,300", 
                    "Description": "The number of healthy backend servers.", 
                    "Dimensions": "userId,instanceId,port,vip", 
                    "Labels": "[{\"name\":\"alertUnit\",\"value\":\"Count\"},{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"metricCategory\",\"value\":\"port\"},{\"name\":\"is_alarm\",\"value\":\"true\"}]", 
                    "Unit": "Count", 
                    "Statistics": "Average,Minimum,Maximum", 
                    "Namespace": "acs_slb_dashboard"
                }, 
                {
                    "MetricName": "InactiveConnection", 
                    "Periods": "60,300", 
                    "Description": "The current number of inactive connections on the port.", 
                    "Dimensions": "userId,instanceId,port,protocol", 
                    "Labels": "[{\"name\":\"alertUnit\",\"value\":\"Count\"},{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"metricCategory\",\"value\":\"port\"},{\"name\":\"is_alarm\",\"value\":\"true\"}]", 
                    "Unit": "Count", 
                    "Statistics": "Average,Minimum,Maximum", 
                    "Namespace": "acs_slb_dashboard"
                }, 
                {
                    "MetricName": "InstanceActiveConnection", 
                    "Periods": "60,300", 
                    "Description": "", 
                    "Dimensions": "userId,instanceId", 
                    "Labels": "[{\"name\":\"alertUnit\",\"value\":\"Count/Second\"},{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"metricCategory\",\"value\":\"instanceId\"},{\"name\":\"is_alarm\",\"value\":\"true\"}]", 
                    "Unit": "Count/s", 
                    "Statistics": "Average,Minimum,Maximum", 
                    "Namespace": "acs_slb_dashboard"
                }, 
                {
                    "MetricName": "InstanceDropConnection", 
                    "Periods": "60,300", 
                    "Description": "", 
                    "Dimensions": "userId,instanceId", 
                    "Labels": "[{\"name\":\"alertUnit\",\"value\":\"Count/Second\"},{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"metricCategory\",\"value\":\"instanceId\"},{\"name\":\"is_alarm\",\"value\":\"true\"}]", 
                    "Unit": "Count/s", 
                    "Statistics": "Average,Minimum,Maximum", 
                    "Namespace": "acs_slb_dashboard"
                }, 
                {
                    "MetricName": "InstanceDropPacketRX", 
                    "Periods": "60,300", 
                    "Description": "", 
                    "Dimensions": "userId,instanceId", 
                    "Labels": "[{\"name\":\"alertUnit\",\"value\":\"Count/Second\"},{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"metricCategory\",\"value\":\"instanceId\"},{\"name\":\"is_alarm\",\"value\":\"true\"}]", 
                    "Unit": "Count/s", 
                    "Statistics": "Average,Minimum,Maximum", 
                    "Namespace": "acs_slb_dashboard"
                }, 
                {
                    "MetricName": "InstanceDropPacketTX", 
                    "Periods": "60,300", 
                    "Description": "", 
                    "Dimensions": "userId,instanceId", 
                    "Labels": "[{\"name\":\"alertUnit\",\"value\":\"Count/Second\"},{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"metricCategory\",\"value\":\"instanceId\"},{\"name\":\"is_alarm\",\"value\":\"true\"}]", 
                    "Unit": "Count/s", 
                    "Statistics": "Average,Minimum,Maximum", 
                    "Namespace": "acs_slb_dashboard"
                }, 
                {
                    "MetricName": "InstanceDropTrafficRX", 
                    "Periods": "60,300", 
                    "Description": "", 
                    "Dimensions": "userId,instanceId", 
                    "Labels": "[{\"name\":\"alertUnit\",\"value\":\"bits/s\"},{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"metricCategory\",\"value\":\"instanceId\"},{\"name\":\"is_alarm\",\"value\":\"true\"}]", 
                    "Unit": "bits/s", 
                    "Statistics": "Average,Minimum,Maximum", 
                    "Namespace": "acs_slb_dashboard"
                }, 
                {
                    "MetricName": "InstanceDropTrafficTX", 
                    "Periods": "60,300", 
                    "Description": "", 
                    "Dimensions": "userId,instanceId", 
                    "Labels": "[{\"name\":\"alertUnit\",\"value\":\"bits/s\"},{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"metricCategory\",\"value\":\"instanceId\"},{\"name\":\"is_alarm\",\"value\":\"true\"}]", 
                    "Unit": "bits/s", 
                    "Statistics": "Average,Minimum,Maximum", 
                    "Namespace": "acs_slb_dashboard"
                }, 
                {
                    "MetricName": "InstanceInactiveConnection", 
                    "Periods": "60,300", 
                    "Description": "", 
                    "Dimensions": "userId,instanceId", 
                    "Labels": "[{\"name\":\"alertUnit\",\"value\":\"Count/Second\"},{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"metricCategory\",\"value\":\"instanceId\"},{\"name\":\"is_alarm\",\"value\":\"true\"}]", 
                    "Unit": "Count/s", 
                    "Statistics": "Average,Minimum,Maximum", 
                    "Namespace": "acs_slb_dashboard"
                }, 
                {
                    "MetricName": "InstanceMaxConnection", 
                    "Periods": "60,300", 
                    "Description": "", 
                    "Dimensions": "userId,instanceId", 
                    "Labels": "[{\"name\":\"alertUnit\",\"value\":\"Count/Second\"},{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"metricCategory\",\"value\":\"instanceId\"},{\"name\":\"is_alarm\",\"value\":\"true\"}]", 
                    "Unit": "Count/s", 
                    "Statistics": "Average,Minimum,Maximum", 
                    "Namespace": "acs_slb_dashboard"
                }, 
                {
                    "MetricName": "InstanceMaxConnectionUtilization", 
                    "Periods": "60,300", 
                    "Description": "The usage of the maximum number of concurrent connections.", 
                    "Dimensions": "userId,instanceId", 
                    "Labels": "[{\"name\":\"alertUnit\",\"value\":\"%\"},{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"metricCategory\",\"value\":\"instanceId\"},{\"name\":\"is_alarm\",\"value\":\"true\"}]", 
                    "Unit": "%", 
                    "Statistics": "Average,Maximum,Minimum", 
                    "Namespace": "acs_slb_dashboard"
                }, 
                {
                    "MetricName": "InstanceNewConnection", 
                    "Periods": "60,300", 
                    "Description": "", 
                    "Dimensions": "userId,instanceId", 
                    "Labels": "[{\"name\":\"alertUnit\",\"value\":\"Count/Second\"},{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"metricCategory\",\"value\":\"instanceId\"},{\"name\":\"is_alarm\",\"value\":\"true\"}]", 
                    "Unit": "Count/s", 
                    "Statistics": "Average,Minimum,Maximum", 
                    "Namespace": "acs_slb_dashboard"
                }, 
                {
                    "MetricName": "InstanceNewConnectionUtilization", 
                    "Periods": "60,300", 
                    "Description": "The usage of the number of new connections.", 
                    "Dimensions": "userId,instanceId", 
                    "Labels": "[{\"name\":\"alertUnit\",\"value\":\"%\"},{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"metricCategory\",\"value\":\"instanceId\"},{\"name\":\"is_alarm\",\"value\":\"true\"}]", 
                    "Unit": "%", 
                    "Statistics": "Average,Maximum,Minimum", 
                    "Namespace": "acs_slb_dashboard"
                }, 
                {
                    "MetricName": "InstancePacketRX", 
                    "Periods": "60,300", 
                    "Description": "", 
                    "Dimensions": "userId,instanceId", 
                    "Labels": "[{\"name\":\"alertUnit\",\"value\":\"Count/Second\"},{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"metricCategory\",\"value\":\"instanceId\"},{\"name\":\"is_alarm\",\"value\":\"true\"}]", 
                    "Unit": "Count/s", 
                    "Statistics": "Average,Minimum,Maximum", 
                    "Namespace": "acs_slb_dashboard"
                }, 
                {
                    "MetricName": "InstancePacketTX", 
                    "Periods": "60,300", 
                    "Description": "", 
                    "Dimensions": "userId,instanceId", 
                    "Labels": "[{\"name\":\"alertUnit\",\"value\":\"Count/Second\"},{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"metricCategory\",\"value\":\"instanceId\"},{\"name\":\"is_alarm\",\"value\":\"true\"}]", 
                    "Unit": "Count/s", 
                    "Statistics": "Average,Minimum,Maximum", 
                    "Namespace": "acs_slb_dashboard"
                }, 
                {
                    "MetricName": "InstanceQps", 
                    "Periods": "60,300", 
                    "Description": "", 
                    "Dimensions": "userId,instanceId", 
                    "Labels": "[{\"name\":\"alertUnit\",\"value\":\"Count/s\"},{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"metricCategory\",\"value\":\"instanceId\"},{\"name\":\"is_alarm\",\"value\":\"true\"}]", 
                    "Unit": "Count/s", 
                    "Statistics": "Average", 
                    "Namespace": "acs_slb_dashboard"
                }, 
                {
                    "MetricName": "InstanceQpsUtilization", 
                    "Periods": "60,300", 
                    "Description": "The QPS usage.", 
                    "Dimensions": "userId,instanceId", 
                    "Labels": "[{\"name\":\"alertUnit\",\"value\":\"%\"},{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"metricCategory\",\"value\":\"instanceId\"},{\"name\":\"is_alarm\",\"value\":\"true\"}]", 
                    "Unit": "%", 
                    "Statistics": "Average,Maximum,Minimum", 
                    "Namespace": "acs_slb_dashboard"
                }, 
                {
                    "MetricName": "InstanceRt", 
                    "Periods": "60,300", 
                    "Description": "", 
                    "Dimensions": "userId,instanceId", 
                    "Labels": "[{\"name\":\"alertUnit\",\"value\":\"ms\"},{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"metricCategory\",\"value\":\"instanceId\"},{\"name\":\"is_alarm\",\"value\":\"true\"}]", 
                    "Unit": "ms", 
                    "Statistics": "Average", 
                    "Namespace": "acs_slb_dashboard"
                }, 
                {
                    "MetricName": "InstanceStatusCode2xx", 
                    "Periods": "60,300", 
                    "Description": "", 
                    "Dimensions": "userId,instanceId", 
                    "Labels": "[{\"name\":\"alertUnit\",\"value\":\"Count/Second\"},{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"metricCategory\",\"value\":\"instanceId\"},{\"name\":\"is_alarm\",\"value\":\"true\"}]", 
                    "Unit": "Count/Second", 
                    "Statistics": "Average", 
                    "Namespace": "acs_slb_dashboard"
                }, 
                {
                    "MetricName": "InstanceStatusCode3xx", 
                    "Periods": "60,300", 
                    "Description": "", 
                    "Dimensions": "userId,instanceId", 
                    "Labels": "[{\"name\":\"alertUnit\",\"value\":\"Count/Second\"},{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"metricCategory\",\"value\":\"instanceId\"},{\"name\":\"is_alarm\",\"value\":\"true\"}]", 
                    "Unit": "Count/Second", 
                    "Statistics": "Average", 
                    "Namespace": "acs_slb_dashboard"
                }, 
                {
                    "MetricName": "InstanceStatusCode4xx", 
                    "Periods": "60,300", 
                    "Description": "", 
                    "Dimensions": "userId,instanceId", 
                    "Labels": "[{\"name\":\"alertUnit\",\"value\":\"Count/Second\"},{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"metricCategory\",\"value\":\"instanceId\"},{\"name\":\"is_alarm\",\"value\":\"true\"}]", 
                    "Unit": "Count/Second", 
                    "Statistics": "Average", 
                    "Namespace": "acs_slb_dashboard"
                }, 
                {
                    "MetricName": "InstanceStatusCode5xx", 
                    "Periods": "60,300", 
                    "Description": "", 
                    "Dimensions": "userId,instanceId", 
                    "Labels": "[{\"name\":\"alertUnit\",\"value\":\"Count/Second\"},{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"metricCategory\",\"value\":\"instanceId\"},{\"name\":\"is_alarm\",\"value\":\"true\"}]", 
                    "Unit": "Count/Second", 
                    "Statistics": "Average", 
                    "Namespace": "acs_slb_dashboard"
                }
            ]
        }, 
        "Code": 200, 
        "Success": true
    }

DescribeMetricLast

Call the DescribeMetricLast operation to query the latest monitoring data for a specific monitoring object of a load balancer. This example queries the latest data for the Layer-7 QPS metric.

  1. Log on to OpenAPI Explorer.

  2. In the parameters, set the parameters for querying Layer-7 QPS.

    Configure the following parameters and keep the default values for other parameters.

    • MetricName: The name of the monitoring metric. In this example, set the value to InstanceQps.

    • Dimensions: A dimension map for querying monitoring data of a specific resource. In this example, set the value to [{"instanceId":"lb-bp1r92vzpemy099f******"}].

    • Namespace: The namespace of the cloud service. In this example, set the value to acs_slb_dashboard.

    Sample request

    http(s)://[Endpoint]/?Action=DescribeMetricLast
    &MetricName=InstanceQps
    &Namespace=acs_slb_dashboard
    &Dimensions=[{"instanceId":"lb-bp1r92vzpemy099f******"}]
    &<common request parameters>
  3. From the response, view the latest monitoring data for Layer-7 QPS.

    Sample response

    {
        "RequestId": "B0EED5A2-7FE2-4A0C-B5E9-3D961F86DC9D", 
        "Period": "60", 
        "Datapoints": "[{\"timestamp\":1586248680000,\"userId\":\"16884015959*****\",\"instanceId\":\"lb-bp1r92vzpemy099f*****\",\"port\":\"80\",\"protocol\":\"http\",\"vip\":\"121.43.**.**\",\"Average\":0}]", 
        "Code": "200", 
        "Success": true
    }

DescribeMetricList

Call the DescribeMetricList operation to query the time-series data of a load balancer metric over a specific time range.

  1. Log on to OpenAPI Explorer.

  2. In the parameters, set the parameters for querying the monitoring data of Layer-7 QPS over a specific time range.

    Configure the following parameters and keep the default values for other parameters.

    • MetricName: The name of the monitoring metric. In this example, set the value to InstanceQps.

    • Namespace: The namespace of the cloud service. In this example, set the value to acs_slb_dashboard.

    • Dimensions: A dimension map for querying monitoring data of a specific resource. In this example, set the value to [{"instanceId":"lb-bp1r92vzpemy099f******"}].

    • StartTime: The beginning of the time range to query. The value of StartTime cannot be the same as or later than the value of EndTime. In this example, set the value to 2020-03-28 00:10:00.

      Supported formats:

      • UNIX timestamp: The number of milliseconds since 00:00:00 UTC on January 1, 1970.

      • Format: YYYY-MM-DDThh:mm:ssZ.

    • EndTime: The end of the time range to query. The format is the same as that of StartTime. In this example, set the value to 2020-03-28 00:11:00.

    Sample request

    http(s)://[Endpoint]/?Action=DescribeMetricList
    &MetricName=InstanceQps
    &Namespace=acs_slb_dashboard
    &Dimensions=[{"instanceId":"lb-bp1r92vzpemy099f******"}]
    &StartTime=2020-03-28 00:10:00
    &EndTime=2020-03-28 00:11:00
    &<common request parameters>
  3. From the response, view the monitoring data for Layer-7 QPS over the specified time range.

    Sample response

    {
        "RequestId": "DFF0A853-0E37-4108-A9AF-5B3D609BD489", 
        "Period": "60", 
        "Datapoints": "[{\"timestamp\":1585325460000,\"userId\":\"168840159596****\",\"instanceId\":\"lb-bp1r92vzpemy099f******\",\"port\":\"80\",\"protocol\":\"http\",\"vip\":\"121.43.**.**\",\"Average\":0}]", 
        "Code": "200", 
        "Success": true
    }

View monitoring data by using an SDK

This section describes how to use an SDK to view monitoring metrics and detailed data for CLB. The following example shows how to call the DescribeMetricList operation to query the maximum number of concurrent connections per second for a CLB instance.

  1. Log on to OpenAPI Explorer.

  2. Set the following parameters and keep the default values for other parameters:

    • MetricName: The name of the monitoring metric. In this example, set this parameter to InstanceMaxConnection.

    • Namespace: The namespace of the cloud service. In this example, set this parameter to acs_slb_dashboard.

    • Dimensions: A dimension map for querying monitoring data of a specific resource. In this example, set this parameter to [{"instanceId":"lb-bp1r92vzpemy099f******"}].

    • StartTime: The beginning of the time range to query. The value cannot be the same as or later than the value of EndTime. In this example, set this parameter to 2022-10-13 20:45:03.

      Supported formats:

      • UNIX timestamp: The number of milliseconds since 00:00:00 UTC on January 1, 1970.

      • Format: YYYY-MM-DDThh:mm:ssZ.

    • EndTime: The end of the time range to query. The supported formats are the same as those for StartTime. In this example, set this parameter to 2022-10-13 20:47:03.

  3. On the SDK Sample Code tab, select the Python tab, and then click Run Example.

  4. View the result in the panel that appears.

FAQ

CLB monitoring: Connections without requests

Internet scanning tools might access the public IP address of your CLB instance. These tools initiate TCP connections directly to the public IP address. These connections contribute to the connection count and bandwidth metrics. However, because the scanning tools do not send valid HTTP requests, the request count in Layer-7 monitoring remains empty.

This is the expected statistical behavior for CLB monitoring:

  • Connection and bandwidth metrics count all TCP-level connections, including those generated by scanners.

  • The request count (QPS) measures only valid Layer-7 HTTP/HTTPS requests and does not include TCP connections that lack an HTTP request.

If you migrate your services from CLB to Application Load Balancer (ALB) and notice that the CLB instance still shows connection and bandwidth data but no requests, this is typically caused by scanning activity and does not affect your migrated services.

References

For detailed descriptions of CLB monitoring metrics, see CLB monitoring.