All Products
Search
Document Center

Server Load Balancer:View NLB monitoring data

Last Updated:Dec 26, 2023

If your Network Load Balancer (NLB) instance encounters network issues, such as request timeouts and throttling, or you need to check the load and performance of your NLB instance, you can use CloudMonitor to collect and query the monitoring metrics of your NLB instance. This topic describes how to query NLB monitoring data in the NLB console or by using the API or SDK.

Query monitoring data in the 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, use one of the following methods to view the monitoring data of your NLB instance:

    • View the monitoring data on the Instances page

      1. On the Instances page, find the instance that you want to manage and click monitor in the Monitoring column.

      2. In the Monitoring Information panel, you can click the NLB Instance, Listener, or VIP (Zone) tab to view the monitoring data.

    • View the data on the instance details page

      1. On the Instances page, click the ID of the instance that you want to manage.

      2. On the instance details page, click the Monitoring Chart tab.

      3. On the Monitoring Chart tab, you can click NLB Instance, Listener, or VIP (Zone) to view the monitoring data.

    Note
    • For more information about the metrics, see NLB monitoring metrics.

    • By default, the monitoring data within the last hour is displayed. You can also query monitoring data within the last 3, 6, or 12 hours, or specify a custom time range.

    • After you enable auto refresh, the monitoring chart is updated every minute.

Query monitoring information by calling API operations

This section describes how to query the monitoring metrics and detailed monitoring data of an NLB instance by calling CloudMonitor API operations.

The following figure shows the procedure.monitoring

Perform the following steps:

  1. Query the namespace. Call the DescribeProjectMeta operation to query the namespace of NLB in CloudMonitor.

  2. Optional. Query existing metrics. Call the DescribeMetricMetaList operation to query the descriptions of the time series metrics supported by CloudMonitor or view the descriptions of the metrics in the NLB monitoring metrics topic.

  3. Query the monitoring data of a metric.

    • Call the DescribeMetricLast operation to query the latest monitoring data of an NLB metric.

    • Call the DescribeMetricList operation to query the monitoring data of an NLB metric within a specified time period.

DescribeProjectMeta

Call the DescribeProjectMeta operation to query the namespace of NLB in CloudMonitor. For more information, see DescribeProjectMeta.

  1. Log on to OpenAPI Explorer.

  2. Set the Labels parameter to [{"name":"product","value":"NLB"}] and use the default values for the other parameters. Then, click Initiate Call.

    View sample requests

    http(s)://[Endpoint]/?Action=DescribeProjectMeta
    &Labels=[{"name":"product","value":"NLB"}]
    &<Common request parameters>
  3. Obtain the namespace of NLB in CloudMonitor based on the response parameters. In this example, the value of Namespace is acs_nlb.

    View sample responses

    {
      "RequestId": "D214F951-A63D-523D-8EB5-827F691C0F76",
      "PageSize": 30,
      "PageNumber": 1,
      "Total": 1,
      "Resources": {
        "Resource": [
          {
            "Description": "Network Load Balancer",
            "Labels": "[{\"name\":\"product\",\"value\":\"NLB\"},{\"name\":\"productCategory\",\"value\":\"nlb\"},{\"name\":\"groupFlag\",\"value\":\"true\"},{\"name\":\"cnName\",\"value\":\"Network Load Balancer\"},{\"name\":\"enName\",\"value\":\"Network Load Balancer\"}]",
            "Namespace": "acs_nlb"
          }
        ]
      },
      "Code": 200,
      "Success": true
    }

DescribeMetricMetaList

Call the DescribeMetricMetaList operation to query the descriptions of time series metrics supported by CloudMonitor. For more information, see DescribeMetricMetaList.

  1. Log on to OpenAPI Explorer.

  2. Set the Namespace parameter to acs_nlb and use the default values for the other parameters. Then, click Initiate Call.

    View sample requests

    http(s)://[Endpoint]/?Action=DescribeMetricMetaList
    &Namespace=acs_nlb
    &<Common request parameters>
  3. View the time series metrics of NLB based on the response parameters.

    View sample responses

    {
      "TotalCount": 30,
      "RequestId": "9912911F-AEE2-52A0-AF4E-E0EC16F859E4",
      "Resources": {
        "Resource": [
          {
            "MetricName": "ActiveConnection",
            "Periods": "60,300",
            "Description": "The number of active connections to the listener per second",
            "Dimensions": "userId,instanceId,listenerPort,listenerProtocol",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"Count\"},{\"name\":\"productCategory\",\"value\":\"nlb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"HighResolution\",\"value\":\"false\"},{\"name\":\"HighResolutionPeriod\",\"value\":\"\"},{\"name\":\"dataType\",\"value\":\"\"},{\"name\":\"DefaultTemplate\",\"value\":\"true\"},{\"name\":\"dashboardFlag\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"port\"}]",
            "Unit": "Count",
            "Statistics": "Average",
            "Namespace": "acs_nlb"
          },
          {
            "MetricName": "DropConnection",
            "Periods": "60,300",
            "Description": "The number of connections dropped by the listener per second",
            "Dimensions": "userId,instanceId,listenerPort,listenerProtocol",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"Count/s\"},{\"name\":\"productCategory\",\"value\":\"nlb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"HighResolution\",\"value\":\"false\"},{\"name\":\"HighResolutionPeriod\",\"value\":\"\"},{\"name\":\"dataType\",\"value\":\"\"},{\"name\":\"DefaultTemplate\",\"value\":\"false\"},{\"name\":\"dashboardFlag\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"port\"}]",
            "Unit": "Count/s",
            "Statistics": "Average",
            "Namespace": "acs_nlb"
          },
          {
            "MetricName": "DropPacketRX",
            "Periods": "60,300",
            "Description": "The number of inbound packets dropped by the listener per second",
            "Dimensions": "userId,instanceId,listenerPort,listenerProtocol",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"Count/s\"},{\"name\":\"productCategory\",\"value\":\"nlb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"HighResolution\",\"value\":\"false\"},{\"name\":\"HighResolutionPeriod\",\"value\":\"\"},{\"name\":\"dataType\",\"value\":\"\"},{\"name\":\"DefaultTemplate\",\"value\":\"false\"},{\"name\":\"dashboardFlag\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"port\"}]",
            "Unit": "Count/s",
            "Statistics": "Average",
            "Namespace": "acs_nlb"
          },
          {
            "MetricName": "DropPacketTX",
            "Periods": "60,300",
            "Description": "The number of outbound packets dropped by the listener per second",
            "Dimensions": "userId,instanceId,listenerPort,listenerProtocol",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"Count/s\"},{\"name\":\"productCategory\",\"value\":\"nlb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"HighResolution\",\"value\":\"false\"},{\"name\":\"HighResolutionPeriod\",\"value\":\"\"},{\"name\":\"dataType\",\"value\":\"\"},{\"name\":\"DefaultTemplate\",\"value\":\"false\"},{\"name\":\"dashboardFlag\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"port\"}]",
            "Unit": "Count/s",
            "Statistics": "Average",
            "Namespace": "acs_nlb"
          },
          {
            "MetricName": "DropTrafficRX",
            "Periods": "60,300",
            "Description": "The number of inbound bits dropped by the listener per second",
            "Dimensions": "userId,instanceId,listenerPort,listenerProtocol",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"bits/s\"},{\"name\":\"productCategory\",\"value\":\"nlb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"HighResolution\",\"value\":\"false\"},{\"name\":\"HighResolutionPeriod\",\"value\":\"\"},{\"name\":\"dataType\",\"value\":\"\"},{\"name\":\"DefaultTemplate\",\"value\":\"false\"},{\"name\":\"dashboardFlag\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"port\"}]",
            "Unit": "bits/s",
            "Statistics": "Average",
            "Namespace": "acs_nlb"
          },
          {
            "MetricName": "DropTrafficTX",
            "Periods": "60,300",
            "Description": "The number of outbound bits dropped by the listener per second",
            "Dimensions": "userId,instanceId,listenerPort,listenerProtocol",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"bits/s\"},{\"name\":\"productCategory\",\"value\":\"nlb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"HighResolution\",\"value\":\"false\"},{\"name\":\"HighResolutionPeriod\",\"value\":\"\"},{\"name\":\"dataType\",\"value\":\"\"},{\"name\":\"DefaultTemplate\",\"value\":\"false\"},{\"name\":\"dashboardFlag\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"port\"}]",
            "Unit": "bits/s",
            "Statistics": "Average",
            "Namespace": "acs_nlb"
          },
          {
            "MetricName": "InactiveConnection",
            "Periods": "60,300",
            "Description": "The number of inactive connections to the listener",
            "Dimensions": "userId,instanceId,listenerPort,listenerProtocol",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"Count\"},{\"name\":\"productCategory\",\"value\":\"nlb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"HighResolution\",\"value\":\"false\"},{\"name\":\"HighResolutionPeriod\",\"value\":\"\"},{\"name\":\"dataType\",\"value\":\"\"},{\"name\":\"DefaultTemplate\",\"value\":\"false\"},{\"name\":\"dashboardFlag\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"port\"}]",
            "Unit": "Count",
            "Statistics": "Sum",
            "Namespace": "acs_nlb"
          },
          {
            "MetricName": "InstanceActiveConnection",
            "Periods": "60,300",
            "Description": "The number of active connections to the instance",
            "Dimensions": "userId,instanceId",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"Count\"},{\"name\":\"productCategory\",\"value\":\"nlb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"HighResolution\",\"value\":\"false\"},{\"name\":\"HighResolutionPeriod\",\"value\":\"\"},{\"name\":\"dataType\",\"value\":\"\"},{\"name\":\"DefaultTemplate\",\"value\":\"true\"},{\"name\":\"dashboardFlag\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"instance\"}]",
            "Unit": "Count",
            "Statistics": "Average",
            "Namespace": "acs_nlb"
          },
          {
            "MetricName": "InstanceDropConnection",
            "Periods": "60,300",
            "Description": "The number of connections dropped by the instance per second",
            "Dimensions": "userId,instanceId",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"Count/s\"},{\"name\":\"productCategory\",\"value\":\"nlb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"HighResolution\",\"value\":\"false\"},{\"name\":\"HighResolutionPeriod\",\"value\":\"\"},{\"name\":\"dataType\",\"value\":\"\"},{\"name\":\"DefaultTemplate\",\"value\":\"true\"},{\"name\":\"dashboardFlag\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"instance\"}]",
            "Unit": "Count/s",
            "Statistics": "Average",
            "Namespace": "acs_nlb"
          },
          {
            "MetricName": "InstanceDropPacketRX",
            "Periods": "60,300",
            "Description": "The number of inbound packets dropped by the instance per second",
            "Dimensions": "userId,instanceId",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"Count/s\"},{\"name\":\"productCategory\",\"value\":\"nlb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"HighResolution\",\"value\":\"false\"},{\"name\":\"HighResolutionPeriod\",\"value\":\"\"},{\"name\":\"dataType\",\"value\":\"\"},{\"name\":\"DefaultTemplate\",\"value\":\"false\"},{\"name\":\"dashboardFlag\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"instance\"}]",
            "Unit": "Count/s",
            "Statistics": "Average",
            "Namespace": "acs_nlb"
          },
          {
            "MetricName": "InstanceDropPacketTX",
            "Periods": "60,300",
            "Description": "The number of outbound packets dropped by the instance per second.",
            "Dimensions": "userId,instanceId",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"Count/s\"},{\"name\":\"productCategory\",\"value\":\"nlb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"HighResolution\",\"value\":\"false\"},{\"name\":\"HighResolutionPeriod\",\"value\":\"\"},{\"name\":\"dataType\",\"value\":\"\"},{\"name\":\"DefaultTemplate\",\"value\":\"false\"},{\"name\":\"dashboardFlag\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"instance\"}]",
            "Unit": "Count/s",
            "Statistics": "Average",
            "Namespace": "acs_nlb"
          },
          {
            "MetricName": "InstanceDropTrafficRX",
            "Periods": "60,300",
            "Description": "The number of inbound bits dropped by the instance per second",
            "Dimensions": "userId,instanceId",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"bits/s\"},{\"name\":\"productCategory\",\"value\":\"nlb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"HighResolution\",\"value\":\"false\"},{\"name\":\"HighResolutionPeriod\",\"value\":\"\"},{\"name\":\"dataType\",\"value\":\"\"},{\"name\":\"DefaultTemplate\",\"value\":\"false\"},{\"name\":\"dashboardFlag\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"instance\"}]",
            "Unit": "bits/s",
            "Statistics": "Average",
            "Namespace": "acs_nlb"
          },
          {
            "MetricName": "InstanceDropTrafficTX",
            "Periods": "60,300",
            "Description": "The number of outbound bits dropped by the instance per second.",
            "Dimensions": "userId,instanceId",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"bits/s\"},{\"name\":\"productCategory\",\"value\":\"nlb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"HighResolution\",\"value\":\"false\"},{\"name\":\"HighResolutionPeriod\",\"value\":\"\"},{\"name\":\"dataType\",\"value\":\"\"},{\"name\":\"DefaultTemplate\",\"value\":\"false\"},{\"name\":\"dashboardFlag\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"instance\"}]",
            "Unit": "bits/s",
            "Statistics": "Average",
            "Namespace": "acs_nlb"
          },
          {
            "MetricName": "InstanceInactiveConnection",
            "Periods": "60,300",
            "Description": "The number of inactive connections to the instance per second",
            "Dimensions": "userId,instanceId",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"Count/s\"},{\"name\":\"productCategory\",\"value\":\"nlb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"HighResolution\",\"value\":\"false\"},{\"name\":\"HighResolutionPeriod\",\"value\":\"\"},{\"name\":\"dataType\",\"value\":\"\"},{\"name\":\"DefaultTemplate\",\"value\":\"false\"},{\"name\":\"dashboardFlag\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"instance\"}]",
            "Unit": "Count/s",
            "Statistics": "Average",
            "Namespace": "acs_nlb"
          },
          {
            "MetricName": "InstanceMaxConnection",
            "Periods": "60,300",
            "Description": "The maximum number of concurrent connections to the instance per second",
            "Dimensions": "userId,instanceId",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"Count/s\"},{\"name\":\"productCategory\",\"value\":\"nlb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"HighResolution\",\"value\":\"false\"},{\"name\":\"HighResolutionPeriod\",\"value\":\"\"},{\"name\":\"dataType\",\"value\":\"\"},{\"name\":\"DefaultTemplate\",\"value\":\"false\"},{\"name\":\"dashboardFlag\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"instance\"}]",
            "Unit": "Count/s",
            "Statistics": "Average",
            "Namespace": "acs_nlb"
          },
          {
            "MetricName": "InstanceNewConnection",
            "Periods": "60,300",
            "Description": "The number of new connections to the instance per second",
            "Dimensions": "userId,instanceId",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"Count/s\"},{\"name\":\"productCategory\",\"value\":\"nlb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"HighResolution\",\"value\":\"false\"},{\"name\":\"HighResolutionPeriod\",\"value\":\"\"},{\"name\":\"dataType\",\"value\":\"\"},{\"name\":\"DefaultTemplate\",\"value\":\"false\"},{\"name\":\"dashboardFlag\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"instance\"}]",
            "Unit": "Count/s",
            "Statistics": "Average",
            "Namespace": "acs_nlb"
          },
          {
            "MetricName": "InstancePacketRX",
            "Periods": "60,300",
            "Description": "The number of inbound packets to the instance per second",
            "Dimensions": "userId,instanceId",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"Count/s\"},{\"name\":\"productCategory\",\"value\":\"nlb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"HighResolution\",\"value\":\"false\"},{\"name\":\"HighResolutionPeriod\",\"value\":\"\"},{\"name\":\"dataType\",\"value\":\"\"},{\"name\":\"DefaultTemplate\",\"value\":\"false\"},{\"name\":\"dashboardFlag\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"instance\"}]",
            "Unit": "Count/s",
            "Statistics": "Average",
            "Namespace": "acs_nlb"
          },
          {
            "MetricName": "InstancePacketTX",
            "Periods": "60,300",
            "Description": "The number of outbound packets from the instance per second",
            "Dimensions": "userId,instanceId",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"Count/s\"},{\"name\":\"productCategory\",\"value\":\"nlb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"HighResolution\",\"value\":\"false\"},{\"name\":\"HighResolutionPeriod\",\"value\":\"\"},{\"name\":\"dataType\",\"value\":\"\"},{\"name\":\"DefaultTemplate\",\"value\":\"false\"},{\"name\":\"dashboardFlag\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"instance\"}]",
            "Unit": "Count/s",
            "Statistics": "Average",
            "Namespace": "acs_nlb"
          },
          {
            "MetricName": "InstanceTrafficRX",
            "Periods": "60,300",
            "Description": "The number of inbound bits to the instance per second",
            "Dimensions": "userId,instanceId",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"bits/s\"},{\"name\":\"productCategory\",\"value\":\"nlb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"HighResolution\",\"value\":\"false\"},{\"name\":\"HighResolutionPeriod\",\"value\":\"\"},{\"name\":\"dataType\",\"value\":\"\"},{\"name\":\"DefaultTemplate\",\"value\":\"true\"},{\"name\":\"dashboardFlag\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"instance\"}]",
            "Unit": "bits/s",
            "Statistics": "Average",
            "Namespace": "acs_nlb"
          },
          {
            "MetricName": "InstanceTrafficTX",
            "Periods": "60,300",
            "Description": "The number of outbound bits from the instance per second",
            "Dimensions": "userId,instanceId",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"bits/s\"},{\"name\":\"productCategory\",\"value\":\"nlb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"HighResolution\",\"value\":\"false\"},{\"name\":\"HighResolutionPeriod\",\"value\":\"\"},{\"name\":\"dataType\",\"value\":\"\"},{\"name\":\"DefaultTemplate\",\"value\":\"false\"},{\"name\":\"dashboardFlag\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"instance\"}]",
            "Unit": "bits/s",
            "Statistics": "Average",
            "Namespace": "acs_nlb"
          },
          {
            "MetricName": "InstanceUnhealthyServerCount",
            "Periods": "60,300",
            "Description": "The number of unhealthy backend ECS instances of the instance",
            "Dimensions": "userId,instanceId",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"Count\"},{\"name\":\"productCategory\",\"value\":\"nlb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"HighResolution\",\"value\":\"false\"},{\"name\":\"HighResolutionPeriod\",\"value\":\"\"},{\"name\":\"dataType\",\"value\":\"\"},{\"name\":\"DefaultTemplate\",\"value\":\"true\"},{\"name\":\"dashboardFlag\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"instance\"}]",
            "Unit": "Count",
            "Statistics": "Sum",
            "Namespace": "acs_nlb"
          },
          {
            "MetricName": "ListenerHeathyServerCount",
            "Periods": "60,300",
            "Description": "The number of healthy backend ECS instances of the listener",
            "Dimensions": "userId,instanceId,listenerPort,listenerProtocol",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"Count\"},{\"name\":\"productCategory\",\"value\":\"nlb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"HighResolution\",\"value\":\"false\"},{\"name\":\"HighResolutionPeriod\",\"value\":\"\"},{\"name\":\"dataType\",\"value\":\"\"},{\"name\":\"DefaultTemplate\",\"value\":\"true\"},{\"name\":\"dashboardFlag\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"port\"}]",
            "Unit": "Count",
            "Statistics": "Minimum",
            "Namespace": "acs_nlb"
          },
          {
            "MetricName": "ListenerPacketRX",
            "Periods": "60,300",
            "Description": "The number of inbound packets to the listener per second",
            "Dimensions": "userId,instanceId,listenerPort,listenerProtocol",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"Count/s\"},{\"name\":\"productCategory\",\"value\":\"nlb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"HighResolution\",\"value\":\"false\"},{\"name\":\"HighResolutionPeriod\",\"value\":\"\"},{\"name\":\"dataType\",\"value\":\"\"},{\"name\":\"DefaultTemplate\",\"value\":\"false\"},{\"name\":\"dashboardFlag\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"port\"}]",
            "Unit": "Count/s",
            "Statistics": "Average",
            "Namespace": "acs_nlb"
          },
          {
            "MetricName": "ListenerPacketTX",
            "Periods": "60,300",
            "Description": "The number of outbound packets from the listener per second",
            "Dimensions": "userId,instanceId,listenerPort,listenerProtocol",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"Count/s\"},{\"name\":\"productCategory\",\"value\":\"nlb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"HighResolution\",\"value\":\"false\"},{\"name\":\"HighResolutionPeriod\",\"value\":\"\"},{\"name\":\"dataType\",\"value\":\"\"},{\"name\":\"DefaultTemplate\",\"value\":\"false\"},{\"name\":\"dashboardFlag\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"port\"}]",
            "Unit": "Count/s",
            "Statistics": "Average",
            "Namespace": "acs_nlb"
          },
          {
            "MetricName": "ListenerUnhealthyServerCount",
            "Periods": "60,300",
            "Description": "The number of unhealthy backend ECS instances of the listener",
            "Dimensions": "userId,instanceId,listenerPort,listenerProtocol",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"Count\"},{\"name\":\"productCategory\",\"value\":\"nlb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"HighResolution\",\"value\":\"false\"},{\"name\":\"HighResolutionPeriod\",\"value\":\"\"},{\"name\":\"dataType\",\"value\":\"\"},{\"name\":\"DefaultTemplate\",\"value\":\"true\"},{\"name\":\"dashboardFlag\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"port\"}]",
            "Unit": "Count",
            "Statistics": "Maximum",
            "Namespace": "acs_nlb"
          },
          {
            "MetricName": "MaxConnection",
            "Periods": "60,300",
            "Description": "The maximum number of connections to the listener per second",
            "Dimensions": "userId,instanceId,listenerPort,listenerProtocol",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"Count/s\"},{\"name\":\"productCategory\",\"value\":\"nlb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"HighResolution\",\"value\":\"false\"},{\"name\":\"HighResolutionPeriod\",\"value\":\"\"},{\"name\":\"dataType\",\"value\":\"\"},{\"name\":\"DefaultTemplate\",\"value\":\"false\"},{\"name\":\"dashboardFlag\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"port\"}]",
            "Unit": "Count/s",
            "Statistics": "Average",
            "Namespace": "acs_nlb"
          },
          {
            "MetricName": "NewConnection",
            "Periods": "60,300",
            "Description": "The number of new connections to the listener",
            "Dimensions": "userId,instanceId,listenerPort,listenerProtocol",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"Count/s\"},{\"name\":\"productCategory\",\"value\":\"nlb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"HighResolution\",\"value\":\"false\"},{\"name\":\"HighResolutionPeriod\",\"value\":\"\"},{\"name\":\"dataType\",\"value\":\"\"},{\"name\":\"DefaultTemplate\",\"value\":\"true\"},{\"name\":\"dashboardFlag\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"port\"}]",
            "Unit": "Count/s",
            "Statistics": "Average",
            "Namespace": "acs_nlb"
          },
          {
            "MetricName": "NlbInstanceHeathyServerCount",
            "Periods": "60,300",
            "Description": "The number of healthy backend servers of the NLB instance",
            "Dimensions": "userId,instanceId",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"Count\"},{\"name\":\"productCategory\",\"value\":\"nlb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"HighResolution\",\"value\":\"false\"},{\"name\":\"HighResolutionPeriod\",\"value\":\"\"},{\"name\":\"dataType\",\"value\":\"\"},{\"name\":\"DefaultTemplate\",\"value\":\"true\"},{\"name\":\"dashboardFlag\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"instance\"}]",
            "Unit": "Count",
            "Statistics": "Sum",
            "Namespace": "acs_nlb"
          },
          {
            "MetricName": "TrafficRXNew",
            "Periods": "60,300",
            "Description": "The number of inbound bits to the listener per second",
            "Dimensions": "userId,instanceId,listenerPort,listenerProtocol",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"bits/s\"},{\"name\":\"productCategory\",\"value\":\"nlb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"port\"}]",
            "Unit": "bits/s",
            "Statistics": "Average",
            "Namespace": "acs_nlb"
          },
          {
            "MetricName": "TrafficTXNew",
            "Periods": "60,300",
            "Description": "The number of outbound bits from the listener per second",
            "Dimensions": "userId,instanceId,listenerPort,listenerProtocol",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"bits/s\"},{\"name\":\"productCategory\",\"value\":\"nlb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"port\"}]",
            "Unit": "bits/s",
            "Statistics": "Average",
            "Namespace": "acs_nlb"
          }
        ]
      },
      "Code": 200,
      "Success": true
    }

DescribeMetricLast

Call the DescribeMetricLast operation to query the latest value of an NLB metric. In this example, the value of the InstanceNewConnection metric is queried. For more information, see DescribeMetricLast.

  1. Log on to OpenAPI Explorer.

  2. Set the following request parameters for the InstanceNewConnection metric, and then click Initiate Call.

    Set the following parameters and use the default values for the other parameters:

    • MetricName: the name of the metric. This parameter is set to InstanceNewConnection in this example.

    • Dimensions: the resource whose monitoring information you want to query. In this example, [{"instanceId":"nlb-defs3vztfty3nm****"}] is used.

    • Namespace: the namespace of the service. In this example, acs_nlb is used.

    View the sample request

    http(s)://[Endpoint]/?Action=DescribeMetricLast
    &MetricName=InstanceNewConnection
    &Namespace=acs_nlb
    &Dimensions=[{"instanceId":"nlb-defs3vztfty3nm****"}]
    &<Common request parameters>
  3. View the latest value of the InstanceNewConnection metric based on the response parameters.

    View the sample response

    {
      "RequestId": "7F96EE67-5172-567E-9A80-410705EC4A99",
      "Period": "60",
      "Datapoints": "[{\"timestamp\":1665479760000,\"instanceId\":\"nlb-defs3vztfty3nm****\",\"userId\":\"1461700914926653\",\"Average\":7.0}]",
      "Code": "200",
      "Success": true
    }

DescribeMetricList

Call the DescribeMetricList operation to query the values of an NLB metric within a specified time period. The following example describes how to query the values of the InstanceMaxConnection metric within a specified time period. For more information, see DescribeMetricList.

  1. Log on to OpenAPI Explorer.

  2. Set the following request parameters for the InstanceMaxConnection metric, and then click Initiate Call.

    Set the following parameters and use the default values for the other parameters:

    • MetricName: the metric name. In this example, the parameter is set to InstanceMaxConnection.

    • Namespace: the namespace of the service. In this example, the parameter is set to acs_nlb.

    • Dimensions: the resource whose monitoring information you want to query. In this example, the parameter is set to [{"instanceId":"nlb-q5515xt60rx5s2****"}].

    • StartTime: the start time. This value must not be greater than or equal to the value of EndTime. In this example, the parameter is set to 2022-10-13 20:45:03.

      Supported formats:

      • UNIX timestamp: the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC

      • UTC time: the UTC time that follows the YYYY-MM-DDThh:mm:ssZ format

    • EndTime: the end time. The supported formats are the same as those supported by the start time. In this example, 2022-10-13 20:47:03 is used.

    View the sample request

    http(s)://[Endpoint]/?Action=DescribeMetricList
    &MetricName=InstanceMaxConnection
    &Namespace=acs_nlb
    &Dimensions=[{"instanceId":"nlb-q5515xt60rx5s2****"}]
    &StartTime=2022-10-13 20:45:03
    &EndTime=2022-10-13 20:47:03
    &<Common request parameters>
  3. View the values of the InstanceMaxConnection metric within the specified time based on the response parameters.

    View sample responses

    {
      "RequestId": "8FBB3D06-834C-57EA-B641-37538EB5FF4E",
      "Period": "60",
      "Datapoints": "[{\"timestamp\":1665665040000,\"instanceId\":\"nlb-q5515xt60rx5s2****\",\"userId\":\"1429972739299349\",\"Average\":3.9668172E7},{\"timestamp\":1665665100000,\"instanceId\":\"nlb-q5515xt60rx5s2****\",\"userId\":\"1429972739299349\",\"Average\":3.9668172E7}]",
      "Code": "200",
      "Success": true
    }

Query monitoring information by using the SDK

This section describes how to query the monitoring metrics and detailed monitoring data of NLB by using the SDK. The following example describes how to query the maximum number of concurrent connections to the NLB instance per second by using the SDK to call the DescribeMetricList operation.

You can also download the SDK to query the monitoring data. For more information, see SDK references.

  1. Log on to OpenAPI Explorer.

  2. Set the following parameters and use the default values for the other parameters.

    • MetricName: the metric name. In this example, the parameter is set to InstanceMaxConnection.

    • Namespace: the namespace of the service. In this example, the parameter is set to acs_nlb.

    • Dimensions: the resource whose monitoring data you want to query. In this example, the parameter is set to [{"instanceId":"nlb-q5515xt60rx5s2****"}].

    • StartTime: the start time. This value must not be greater than or equal to the value of EndTime. In this example, the parameter is set to 2022-10-13 20:45:03.

      Supported formats:

      • UNIX timestamp: the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC

      • UTC time: the UTC time that follows the YYYY-MM-DDThh:mm:ssZ format.

    • EndTime: the end time. The supported formats are the same as those supported by the start time. In this example, 2022-10-13 20:47:03 is used.

  3. Choose SDK Sample Code > Python and click Example.

  4. In the panel below, view the results.