View NLB monitoring information
When you encounter network issues with your Network Load Balancer (NLB) instance, such as request timeouts, traffic throttling, or dropped connections, you can use CloudMonitor to investigate. CloudMonitor provides detailed metrics on the operational status and performance of your NLB resources, helping you quickly identify and diagnose problems. You can view NLB monitoring data using the console, the API, or an SDK.
View monitoring data in the console
Log on to the NLB console.
-
In the top navigation bar, select the region in which the NLB instance is deployed.
On the Instances page, you can view monitoring data in two ways:
View data from the instance list
On the Instances page, find the target instance and click
in the Monitoring column.In the Monitoring Information panel that appears, switch between the NLB Instance, Listener, and VIP (Zone) tabs to view monitoring data.
View data from the instance details page
On the Instances page, find the target instance and click its ID.
On the Instance Details page, click the Monitoring Chart tab.
On the Monitoring Chart tab, switch between the NLB Instance, Listener, and VIP (Zone) tabs to view monitoring data.
NoteFor more information about NLB metrics, see NLB metrics.
By default, monitoring data from the last hour is displayed. You can select a time range of 3 hours, 6 hours, or 12 hours. You can also select Custom to specify a custom time range.
If you enable Auto Refresh, the monitoring chart automatically updates every minute.
View monitoring data via API
This section describes how to use the CloudMonitor API to query metrics and detailed monitoring data for an NLB instance.
The following figure shows the API query workflow.
The workflow is as follows:
Query the namespace. Call the DescribeProjectMeta operation to query the namespace of NLB in CloudMonitor.
Optional: View available metrics. Call the DescribeMetricMetaList operation to query available time-series metrics in CloudMonitor, or see NLB metrics.
Query monitoring data for a specific metric.
Call the DescribeMetricLast operation to query the latest data point for a specific NLB metric.
Call the DescribeMetricList operation to query time-series data for a specific NLB metric over a specified period.
DescribeProjectMeta
Call the DescribeProjectMeta operation to query the namespace of NLB in CloudMonitor. For more information, see DescribeProjectMeta.
Set request parameters. Set the Labels parameter to
[{"name":"product","value":"NLB"}]. Keep the default values for other parameters and click Initiate Call.In the response, find the namespace for NLB. The value of Namespace is
acs_nlb.
DescribeMetricMetaList
Call the DescribeMetricMetaList operation to query available time-series metrics in CloudMonitor. For more information, see DescribeMetricMetaList.
Set request parameters. Set the Namespace parameter to
acs_nlb. Keep the default values for other parameters and click Initiate Call.In the response, view the available time-series metrics for NLB.
DescribeMetricLast
Call the DescribeMetricLast operation to query the latest data point for a specific NLB metric. This example shows how to query data for the InstanceNewConnection metric, which indicates the number of new connections established on an instance per second. For more information, see DescribeMetricLast.
Set the request parameters to query the InstanceNewConnection metric, and then click Initiate Call.
Set the following parameters and keep the default values for the others.
MetricName: The name of the metric. Set the value to InstanceNewConnection.
Dimensions: The dimensions of the resource to query. Set the value to
[{"instanceId":"nlb-defs3vztfty3nm****"}].Namespace: The namespace of the service. Set the value to acs_nlb.
In the response, view the latest monitoring data for the InstanceNewConnection metric.
DescribeMetricList
Call the DescribeMetricList operation to query the time-series data of an NLB metric over a specified period. This example shows how to query data for the InstanceMaxConnection metric, which indicates the maximum number of concurrent connections on an instance per second. For more information, see DescribeMetricList.
Set the request parameters to query monitoring data for InstanceMaxConnection over a specified time range, and then click Initiate Call.
Set the following parameters and keep the default values for the others.
MetricName: The name of the metric. Set the value to InstanceMaxConnection.
Namespace: The namespace of the service. Set the value to acs_nlb.
Dimensions: The dimensions of the resource to query. Set the value to
[{"instanceId":"nlb-q5515xt60rx5s2****"}].StartTime: The start of the time range to query. The value of this parameter must be earlier than the value of EndTime. Set the value to
2022-10-13 20:45:03.Supported formats:
UNIX timestamp: The number of milliseconds since 00:00:00 UTC on January 1, 1970.
ISO 8601 format: YYYY-MM-DDThh:mm:ssZ.
EndTime: The end of the time range to query. The supported formats are the same as those for StartTime. Set the value to
2022-10-13 20:47:03.
In the response, view the monitoring data for InstanceMaxConnection during the specified time range.
View monitoring data via SDK
You can use an SDK to query metrics and detailed monitoring data for NLB. This example shows how to call the DescribeMetricList operation to query the maximum number of concurrent connections on an NLB instance per second.
Set the following request parameters and keep the default values for the others.
MetricName: The name of the metric. In this example, set the value to InstanceMaxConnection.
Namespace: The namespace of the service. In this example, set the value to acs_nlb.
Dimensions: The dimensions of the resource to query. In this example, set the value to
[{"instanceId":"nlb-q5515xt60rx5s2****"}].StartTime: The start of the time range to query. The value of this parameter must be earlier than the value of EndTime. In this example, set the value to
2022-10-13 20:45:03.Supported formats:
UNIX timestamp: The number of milliseconds since 00:00:00 UTC on January 1, 1970.
ISO 8601 format: YYYY-MM-DDThh:mm:ssZ.
EndTime: The end of the time range to query. The supported formats are the same as those for StartTime. In this example, set the value to
2022-10-13 20:47:03.
On the SDK Sample Code tab, select a language such as Python and click Run in the right-side panel.
View the result in the panel that appears at the bottom of the page.