All Products
Search
Document Center

Server Load Balancer:Configure fine-grained monitoring for NLB

Last Updated:Apr 03, 2024

Network Load Balancer (NLB) is integrated with Simple Log Service, which supports fine-grained monitoring. You can query the monitoring metrics of Layer 4 listeners to check the monitoring data of an NLB instance, including the amount of network traffic within seconds, number of new connections, and maximum number of connections. This helps you identify errors based on more detailed monitoring data.

Supported regions

The following table describes the regions in which fine-grained monitoring is supported.

Area

Region

China

China (Hangzhou), China (Beijing), China (Shenzhen), China (Shanghai), China (Qingdao), China (Zhangjiakou), China (Chengdu), China (Guangzhou), China (Ulanqab), China (Hong Kong), and China (Heyuan)

Asia Pacific

Singapore, Japan (Tokyo), South Korea (Seoul), India (Mumbai), Malaysia (Kuala Lumpur), Indonesia (Jakarta), Thailand (Bangkok), and Philippines (Manila)

Europe & Americas

Germany (Frankfurt), UK (London), US (Virginia), and US (Silicon Valley)

Middle East

SAU (Riyadh - Partner Region)

Billing

After NLB delivers monitoring data to Simple Log Service, Simple Log Service charges fees based on the storage space, read traffic, requests, data transformation, and data shipping. For more information, see Pricing.

Prerequisites

Enable fine-grained monitoring

  1. Log on to the NLB console.
  2. In the top navigation bar, select the region in which the NLB instance is deployed.

  3. On the Instances page, click the ID of the NLB instance that you want to manage and click the Fine-grained Monitoring tab.

  4. Enable fine-grained monitoring in the current region.

    Note

    If the feature 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 or enter a project and a Metricstore, select the I understand the above information check box, and then click OK.

      Important
      • In this step, the system automatically creates the AliyunServiceRoleForNLBLogDelivery Resource Access Management (RAM) role. NLB can assume this role to deliver log data to Simple Log Service.

      • Do not revoke the authorization or delete the RAM role. Otherwise, the monitoring data of metrics cannot be delivered to Simple Log Service.

  5. Enable or disable fine-grained monitoring for a TCP, UDP, or TCP/SSL listener.

    • Enable fine-grained monitoring for a listener

      • Click the Settings tab, find the listener for which you want to enable fine-grained monitoring, and then turn on Fine-grained Monitoring.

      • Enable fine-grained monitoring for multiple listeners

        1. Select the listeners for which you want to enable fine-grained monitoring and click Batch Enable Fine-grained Monitoring.

        2. In the Batch Enable Fine-grained Monitoring message, click OK.

          Note

          Take note of the following information:

          • Monitoring data is delivered to Simple Log Service about 5 seconds after the data is collected.

          • New connections are included in the monitoring data. Existing persistent connections are not included.

    • Disable fine-grained monitoring for a listener

      • Click the Settings tab, find the listener for which you want to disable fine-grained monitoring, and then turn off Fine-grained Monitoring.

      • Disable fine-grained monitoring for multiple listeners

        1. Select the listeners for which you want to disable fine-grained monitoring and click Batch Disable Fine-grained Monitoring.

        2. In the Batch Disable Fine-grained Monitoring message, click OK.

What to do next

After you enable fine-grained monitoring for NLB and the monitoring data is delivered to Simple Log Service, you can view the monitoring data, including monitoring metrics, analysis, and bills, modify storage configurations, and manage monitoring data in the Simple Log Service console.

  1. Log on to the NLB console.
  2. In the top navigation bar, select the region in which the NLB instance is deployed.

  3. On the Instances page, click the ID of the NLB instance that you want to manage and click the Fine-grained Monitoring tab.

  4. On the Fine-grained Monitoring tab, you can perform the following operations:

    • View monitoring metrics

      To view the monitoring metrics of your NLB instance, click the Fine-grained Monitoring tab.

    • View monitoring analysis

      To view the analysis of monitoring metrics of your NLB instance, click the Fine-grained Monitoring Analysis tab.

    • Modify storage configurations

      To modify the project and Metricstore, click the Settings tab and click Modify to the right of Log Service Configuration.

    • View fine-grained monitoring bills

      To view the bills of fine-grained monitoring, click View Fine-grained Monitoring Bill to go to the Simple Log Service console. For more information, see Upgrade Cost Manager to the new version.

    • Go to the Simple Log Service console

      To query, analyze, download, deliver, and transform monitoring data or create alert rules, click Log Service to go to the Simple Log Service console. For more information, see Common operations on logs of Alibaba Cloud services.

Metrics

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

You can query and analyze time series data by using PromQL or SQL statements. For more information, see Overview of query and analysis on metric data.

Metric

Description

actConns

Number of active connections

connsPS

Number of new connections per second

dropConnPS

Number of connections dropped per second

failConnPS

Number of failed connections per second

inActConnPS

Number of inactive connections

totalConns

Number of concurrent connection

flow_in_rx_bps

Number of inbound bits per second

flow_in_rx_pps

Number of inbound packets per second

flow_out_tx_bps

Number of outbound bits per second

flow_out_tx_pps

Number of outbound packets per second