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, Layer 4 monitoring metrics are sent to Log Service. The monitoring metrics are accurate to the second.
- An SLB instance is created. For more information, see Create a CLB 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 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.
- Log on to the SLB console.
- In the left-side navigation pane, choose .
- On the Instances page, click the ID of the SLB instance.
- Click Fine-grained Monitoring.
- Enable the fine-grained monitoring feature in the current region. If the fine-grained monitoring feature is enabled in the current region, skip this step.
- Click Enable Fine-grained Monitoring.
- In the Enable Fine-grained Monitoring for SLB dialog box, select the project and Metricstore that you created, select the I understand the above information check box, and then click OK. Notice
- When you perform this operation, the system automatically creates a Resource Access Management (RAM) role named AliyunServiceRoleForSlbLogDelivery. You can asign this RAM role to SLB to send monitoring metrics that are accurate to the second to Log Service.
- To ensure that monitoring metrics for SLB instances can be sent to Log Service, do not revoke permissions from the RAM role or delete the RAM role.
- Enable the Layer 4 monitoring feature for the TCP or UDP listener.
- On the Fine-grained Monitoring tab, click Settings.
- On the Settings tab, turn on the Fine-grained Monitoring switch for the TCP or UDP listener.