All Products
Search
Document Center

Simple Log Service:Enable the Layer 4 monitoring feature

Last Updated:Apr 10, 2024

This topic describes how to enable the Layer 4 monitoring feature for a Server Load Balancer (SLB) instance in the SLB console. After you enable the feature, the metrics of Layer 4 monitoring are sent to Simple Log Service. The metrics are accurate to seconds.

Prerequisites

  • An SLB instance is created. For more information, see Create an instance.

  • A TCP or UDP listener is configured for the SLB instance. For more information, see Add a TCP listener and Add a UDP listener.

  • A Simple Log Service project and a Metricstore are created in the region where the SLB instance resides. For more information, see Create a project and Create a Metricstore.

    Important

    The name of a Metricstore in a project must be different from the name of an existing Logstore or Metricstore in the project.

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 CLB dialog box, select the project and Metricstore that you created, select I understand the above information, and then click OK.
      Important
      • 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 Simple Log Service collects the metrics of Layer 4 monitoring on the SLB instance, you can query, analyze, download, ship, and transform the metrics in the Simple Log Service console. You can also configure alert rules for the metrics. For more information, see Common operations on logs of Alibaba Cloud services.