NLB integrates with Log Service (SLS) to launch a fine-grained, second-level monitoring feature. You can view metrics for an NLB instance, such as per-second traffic, new connections, and maximum connections, through a Layer 4 listener to enable more detailed service monitoring and troubleshooting.
Supported regions
The following table lists the regions where fine-grained monitoring is available.
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), Malaysia (Kuala Lumpur), Indonesia (Jakarta), Thailand (Bangkok), and Philippines (Manila) |
Europe and Americas | Germany (Frankfurt), UK (London), US (Virginia), and US (Silicon Valley) |
Middle East | SAU (Riyadh - Partner Region) |
Billing
After NLB sends logs to Simple Log Service (SLS), SLS charges you for services such as storage, read traffic, requests, data processing, and data transfer. For more information, see Pricing.
Prerequisites
You have activated Simple Log Service.
You have added a TCP, UDP, or TCP/SSL listener to your NLB instance. For more information, see the following topics:
In the region where your NLB instance is deployed, you have created a Simple Log Service project and a Metricstore. For more information, see Manage a project and Manage a Metricstore.
NoteIn the same project, a Metricstore cannot have the same name as an existing Logstore.
Enable or disable fine-grained monitoring
Log on to the NLB console.
In the top navigation bar, select the region where the NLB instance is deployed.
On the Instances page, click the ID of the instance, and then click the Fine-grained Monitoring tab.
Enable fine-grained monitoring for the current region.
NoteIf fine-grained monitoring is already enabled for the current region, skip this step.
On the Fine-grained Monitoring tab, click Enable Fine-grained Monitoring.
In the Enable Fine-grained Monitoring for SLB dialog box, select or enter a project and a Metricstore, select I understand the above information., and then click OK.
ImportantWhen you perform this operation, the system automatically creates a RAM role named
AliyunServiceRoleForNLBLogDelivery. This role grants NLB permissions to send monitoring metrics to SLS.Do not revoke the permissions or delete the RAM role. Otherwise, NLB cannot send monitoring metrics to SLS.
Enable or disable fine-grained monitoring for the target TCP, UDP, or TCP/SSL listener.
Enable fine-grained monitoring
Enable for a single listener: On the Settings tab, find the target listener and turn on the Fine-grained Monitoring switch.
Enable for multiple listeners
Select the listeners for which you want to enable fine-grained monitoring and click Batch Enable Fine-grained Monitoring.
In the Batch Enable Fine-grained Monitoring dialog box, click OK.
NoteAfter you enable fine-grained monitoring:
Monitoring data appears in Simple Log Service with a delay of about 5 seconds.
Monitoring includes all new connections. Persistent connections established before you enable this feature are not monitored.
Disable fine-grained monitoring
Disable for a single listener: On the Settings tab, find the target listener and turn off the Fine-grained Monitoring switch.
Disable for multiple listeners
Select the listeners for which you want to disable fine-grained monitoring and click Batch Disable Fine-grained Monitoring.
In the Batch Disable Fine-grained Monitoring dialog box, click OK.
Next steps
After you enable fine-grained monitoring and Simple Log Service (SLS) starts collecting NLB monitoring data, you can view monitoring metrics, analyze data, check bills, modify log storage settings, and manage logs in the SLS console.
Log on to the NLB console.
In the left-side navigation pane, click Instances.
On the Instances page, click the ID of the instance, and then click the Fine-grained Monitoring tab.
On the Fine-grained Monitoring tab, you can perform the following operations:
View monitoring metrics: Click the Monitoring Metrics tab to view the monitoring metrics of NLB.
View monitoring analysis: Click the Fine-grained Monitoring Analysis tab to view the metric analysis for NLB.
Modify log storage settings: Click the Settings tab. In the Log Service Configuration section, click Modify to change the Project and Metricstore.
View monitoring bills: Click View Fine-grained Monitoring Bill to view billing details in the SLS console. For more information about bills, see Upgrade to the new version of Cost Manager.
Manage logs in SLS: Click Log Service to open the SLS console. In the console, you can query, analyze, download, transfer, and process data, and configure alerts. For more information, see Common operations on logs for Alibaba Cloud services.
Metrics
Metric | Description |
actConns | Active connections |
connsPS | New connections per second |
dropConnPS | Dropped connections per second |
failConnPS | Failed connections per second |
inActConnPS | Inactive connections per second |
totalConns | Concurrent connections |
flow_in_rx_bps | Inbound traffic rate, in bit/s. |
flow_in_rx_pps | Inbound packets per second. |
flow_out_tx_bps | Outbound traffic rate, in bit/s. |
flow_out_tx_pps | Outbound packets per second. |
The metrics described in this topic use the time series data format. For more information, see Time series data (Metric).
You can use PromQL or SQL statements to query and analyze this data. For more information, see Introduction to query and analysis of time series data.