Alibaba Cloud integrates Classic Load Balancer (CLB) with Log Service to provide the fine-grained monitoring feature. You can query monitoring information, such as traffic, connection per second (CPS), and error percentage, about CLB by using Layer 4 listener metrics. Fine-grained monitoring provides you with detailed monitoring information, and allows you to troubleshoot issues.

Billing

After CLB delivers logs to Log Service, you are charged by Log Service based on the storage space, read traffic, requests, data processing, and log data delivered to Log Service. For more information, see Log Service pricing.

Prerequisites

Enable fine-grained monitoring

  1. Log on to the CLB console.
  2. In the top navigation bar, select the region where the CLB instance is deployed.
  3. On the Instances page, find the CLB instance that you want to manage, click its ID, and then click the Fine-grained Monitoring tab.
  4. Enable fine-grained monitoring for the current region.
    If fine-grained monitoring is already enabled in the current region, skip this step.
    1. On the Fine-grained Monitoring tab, click Enable Fine-grained Monitoring.
    2. In the Enable Fine-grained Monitoring for SLB dialog box, select the project and Metricstore that you created, select I understand the above information, and then click OK.
      Notice
      • When you perform this operation, the system automatically creates a RAM role named AliyunServiceRoleForSlbLogDelivery. CLB can assume this role to deliver fine-grained monitoring metrics to Log Service.
      • Do not revoke authorization or delete the RAM role. Otherwise, fine-grained monitoring metrics cannot be delivered to Log Service.
  5. Enable fine-grained monitoring for the TCP or UDP listener.
    1. Choose Fine-grained Monitoring > Settings.
    2. On the Settings tab, turn on the Fine-grained Monitoring switch for the TCP or UDP listener.
    Note After you enable fine-grained monitoring, Log Service receives monitoring information about CLB with a delay of about 5 seconds.

What to do next

After Log Service collects monitoring data about CLB , you can query, analyze, download, transfer, and process the data in the Log Service console. In addition, you can set alerts. For more information, see Common operations on logs of Alibaba Cloud services.

Descriptions of metrics

The metrics described in this topic use the format of time series data. For more information, see Time series.

You can query and analyze time series data by using PromQL or SQL. For more information, see Overview of time series search and analytics.

Table 1. Metrics
Metric Description
actConnsPS Active connections per second
connsPS New connections per second
dropConnPS Dropped connections per second
failConnPS Failed connections per second
inActConnPS Short-lived connections per second
inBitsPS Inbound bits per second. Unit: bit/s
inDropBitsPS Inbound bits that are dropped per second. Unit: bit/s
inDropPktsPS Inbound packets that are dropped per second
inPktsPS Inbound packets per second
aclDropBitsPS Inbound bits that are dropped per second due to ACL throttling. Unit: bit/s
aclDropPktsPS Inbound packets that are dropped per second due to ACL throttling
maxConnsPs Concurrent connections per second
outBitsPS Outbound bits per second. Unit: bit/s
outDropBitsPS Outbound bits that are dropped per second. Unit: bit/s
outDropPktsPS Outbound packets that are dropped per second
Table 2. Labels
Label Description
lbId The ID of the CLB instance
listenerId The ID of the listener
protocol Protocol
vip The IP address of the listener
vport The port of the listener