All Products
Search
Document Center

Server Load Balancer:View monitoring data of CLB

Last Updated:Jan 12, 2024

If your Classic Load Balancer (CLB) instance encounters errors, such as request timeouts and throttling, or you want to check the load and performance of your CLB instance, you can use CloudMonitor to view the status and metrics of CLB. CloudMonitor helps you quickly locate errors. This topic describes how to view the monitoring data of a CLB instance in the CLB console or by calling the API or SDK.

Prerequisites

A CLB instance is created and listeners are added to the CLB instance. For more information, see the following topics:

View monitoring data in the CLB console

  1. Log on to the CLB console.

  2. In the top navigation bar, select the region where the CLB instance resides.

  3. Use one of the following methods to view monitoring information.

    • Method 1

      1. On the Instances page, find the CLB instance that you want to manage and click monitor in the Monitoring column.

      2. In the Monitoring Information panel, click the Instances or Listeners tab to view the monitoring information.

        You can choose Instances > Bandwidth/Traffic. In the upper part of the monitoring chart, you can view the amount of processed data, which includes requests and responses.

      You can set Time to specify a period of time. If you turn on Auto Refresh, the monitoring data is updated every minute.

    • Method 2

      1. On the Instances page, click the ID of the CLB instance that you want to manage. On the Instance Details tab, click the Monitoring tab.

      2. On the Monitoring tab, click the Instances or Listeners tab to view the monitoring data.

        You can choose Instances > Bandwidth/Traffic. In the upper part of the monitoring chart, you can view the amount of processed data, which includes requests and responses.

      You can set Time to specify a period of time. If you turn on Auto Refresh, the monitoring data is updated every minute.

    The following table describes the monitoring metrics that are supported.

    Metric

    Description

    Traffic

    • Inbound Traffic: the amount of network traffic to the CLB instance.

    • Outbound Traffic: the amount of network traffic from the CLB instance.

    Packets

    • Inbound Packets: the number of packets received by the CLB instance per second.

    • Outbound Packets: the number of packets sent by the CLB instance per second.

    Concurrent Connections

    • Active Connections: the number of TCP connections that are in the ESTABLISHED state. If persistent connections are used, a connection can transfer multiple files at the same time.

    • Inactive Connections: the number of TCP connections that are not in the ESTABLISHED state. You can run the netstat -an command to view the connections for both Windows and Linux instances.

    • Maximum Concurrent Connections: the total number of TCP connections.

    New Connections

    The average number of new TCP connections established between clients and the CLB instance in a statistical period.

    Traffic Dropped

    • Inbound Traffic Dropped: the amount of inbound traffic dropped per second.

    • Outbound Traffic Dropped: the amount of outbound traffic dropped per second.

    Packets Dropped

    • Inbound Packets Dropped: the number of inbound packets dropped per second.

    • Outbound Packets Dropped: the number of outbound packets dropped per second.

    Connections Dropped

    The number of connections dropped per second.

    Metrics specific to Layer 7 (HTTP/HTTPS) listeners

    Layer 7 QPS

    The number of HTTP and HTTPS requests that can be processed per second.

    Layer 7 RT

    The average response time of the CLB instance.

    Layer 7 2XX/3XX/4XX/5XX/Other Status Codes

    The number of HTTP response codes returned by listeners.

    Layer 7 Upstream Code 4XX/5XX

    The number of HTTP response codes returned by backend servers.

    Layer 7 Upstream RT

    The average response time of backend servers.

Query monitoring information by calling API operations

You can query the monitoring data of a CLB instance by calling CloudMonitor API operations.

monitoring

To query monitoring data by calling API operations, perform the following operations:

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

  2. Optional. Query existing metrics. Call the DescribeMetricMetaList operation to query the descriptions of the time series metrics supported by CloudMonitor or view the descriptions of the metrics in the relevant topic. For more information, see Monitoring and alerting metrics.

  3. Query the monitoring data of a metric.

    • Call the DescribeMetricLast operation to query the latest monitoring data of a CLB metric.

    • Call the DescribeMetricList operation to query the monitoring data of a time series metric of CLB in a specific period of time.

DescribeProjectMeta

Call the DescribeProjectMeta operation to query the namespace of CLB.

  1. Log on to OpenAPI Explorer.

  2. Set the value of the request parameter Labels to [{"name":"product","value":"SLB"}] and use the default values for the other parameters.

    Sample request:

    http(s)://[Endpoint]/?Action=DescribeProjectMeta
    &Labels=[{"name":"product","value":"SLB"}]
    &<Common request parameters>
  3. The returned value of Namespace in CloudMonitor is acs_slb_dashboard.

    Sample success response:

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

DescribeMetricMetaList

Call the DescribeMetricMetaList operation to query the time series metrics that are available in CloudMonitor.

  1. Log on to OpenAPI Explorer.

  2. Set the value of the request parameter Namespace to acs_slb_dashboard and use the default values for the other parameters.

    Sample request:

    http(s)://[Endpoint]/?Action=DescribeMetricMetaList
    &Namespace=acs_slb_dashboard
    &<Common request parameters>
  3. View the time series metrics of CLB based on the returned parameters. Check whether the QPS parameter that is used in this example is returned.

    Sample success response:

    {
        "TotalCount": 53, 
        "RequestId": "789846B4-56FC-4681-998C-5B7DBDFBE28F", 
        "Resources": {
            "Resource": [
                {
                    "MetricName": "ActiveConnection", 
                    "Periods": "60,300", 
                    "Description": "Number of active connections to 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": "Number of healthy ECS instances", 
                    "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": "Number of inactive connections to 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": "Maximum connection 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": "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": "New connection 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": "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": "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 of a CLB metric. In this example, the Layer 7 QPS metric is queried.

  1. Log on to OpenAPI Explorer.

  2. Set the relevant request parameters.

    Set the following parameters and use the default values for the other parameters.

    • MetricName: the name of the monitoring metric. Set the value to QPS.

    • Dimensions: the resource whose monitoring information you want to query. In this example, [{"instanceId":"lb-bp1r92vzpemy099f******"}] is used.

    • Namespace: the namespace of the service. In this example, acs_slb_dashboard is used.

    Sample request:

    http(s)://[Endpoint]/?Action=DescribeMetricLast
    &MetricName=Qps
    &Namespace=acs_slb_dashboard
    &Dimensions=[{"instanceId":"lb-bp1r92vzpemy099f******"}]
    &<Common request parameters>
  3. You can view the latest QPS data based on the returned parameters.

    Sample success 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 monitoring data of a time series metric of CLB within a specific time period.

  1. Log on to OpenAPI Explorer.

  2. Set the relevant request parameters.

    Set the following parameters and use the default values for the other parameters.

    • MetricName: the name of the monitoring metric. Set the value to QPS.

    • Namespace: the namespace of the service. In this example, acs_slb_dashboard is used.

    • Dimensions: the resource whose monitoring data you want to query. In this example, [{"instanceId":"lb-bp1r92vzpemy099f******"}] is used.

    • StartTime: the start time. The start time must be earlier than the end time. In this example, 2020-03-28 00:10:00 is used.

      Supported formats:

      • UNIX timestamp: the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC

      • UTC time: the UTC time that follows the YYYY-MM-DDThh:mm:ssZ format.

    • EndTime: the end time. The start time and the end time use the same format. In this example, 2020-03-28 00:11:00 is used.

    Sample request

    http(s)://[Endpoint]/?Action=DescribeMetricList
    &MetricName=Qps
    &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. You can view the QPS data within a specified time period based on the returned parameters.

    Sample success 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 SDKs

This section describes how to view the monitoring metrics of CLB by using SDKs. In this example, the DescribeMetricList operation is used to query the maximum number of concurrent connections per second for a CLB instance.

You can also download the SDK to query the monitoring data. For more information, see SDK references.

  1. Log on to OpenAPI Explorer.

  2. Set the following parameters and use the default values for the other parameters.

    • MetricName: the metric name. In this example, the parameter is set to InstanceMaxConnection.

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

    • Dimensions: the resource whose monitoring data you want to query. In this example, the parameter is set to [{"instanceId":"lb-bp1r92vzpemy099f******"}].

    • StartTime: the start time. This value must not be greater than or equal to the value of EndTime. In this example, the parameter is set to 2022-10-13 20:45:03.

      Supported formats:

      • UNIX timestamp: the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC

      • UTC time: the UTC time that follows the YYYY-MM-DDThh:mm:ssZ format.

    • EndTime: the end time. The supported formats are the same as those supported by the start time. In this example, 2022-10-13 20:47:03 is used.

  3. On the SDK Sample Code > Python tab, click Example.

  4. In the panel below, view the results.

References

For more information about the descriptions of CLB monitoring metrics, see Monitoring and alerting metrics.