查看NLB监控信息

当您遇到网络型负载均衡NLB请求超时、流量限速等网络连接问题,或者需要了解NLB的负载、性能等情况时,您可以利用云监控功能查看NLB资源的运行状态和各个指标的使用情况,方便快速定位问题。您可以通过控制台、API、SDK方式来查看NLB的监控信息。

通过控制台查看监控

  1. 登录网络型负载均衡NLB控制台
  2. 在顶部菜单栏,选择NLB实例所属的地域。

  3. 实例页面,您可以选择以下任意一种方式查看监控。

    • 在实例列表页面直接查看

      1. 实例页面,找到目标实例,在监控列单击monitor

      2. 在弹出的监控信息面板,切换实例监听VIP(可用区)页签,查看监控信息。

    • 在实例详情页面查看

      1. 实例页面,找到目标实例,单击实例ID。

      2. 实例详情页签,单击监控图表页签。

      3. 监控图表页签,切换实例监听VIP(可用区)页签,查看监控信息。

    说明
    • 关于NLB实例监控项详细说明,请参见NLB监控项说明

    • 系统默认为您展示最近1小时内的监控数据,您可以选择查看3小时内、6小时内或12小时内的监控数据,还可以选择自定义,自定义需要设置查看的时间段。

    • 开启自动刷新后监控图表每分钟自动刷新监控数据。

通过API查看监控

介绍如何通过云监控API查看网络型负载均衡实例的监控项和详细监控数据。

通过API查看监控数据流程,如下图所示。monitoring

流程说明如下:

  1. 查看数据命名空间Namespace。调用DescribeProjectMeta接口查询云监控中NLB的数据命名空间Namespace。

  2. 可选:查看已有监控项。调用DescribeMetricMetaList接口查询云监控开放的时序类指标监控项描述或直接查看监控项说明,更多信息,请参见NLB监控项说明

  3. 查看指定监控项的监控数据。

    • 调用DescribeMetricLast接口查询NLB指定监控对象的最新监控数据。

    • 调用DescribeMetricList接口查询NLB指定时间段内监控对象的时序指标监控数据。

DescribeProjectMeta

调用DescribeProjectMeta接口查询云监控中NLB的数据命名空间Namespace,详情请参见DescribeProjectMeta

  1. 登录OpenAPI开发者门户

  2. 将请求参数中报警产品标签过滤Labels的值设置为[{"name":"product","value":"NLB"}],其他参数保持默认值,然后单击发起调用

    查看请求示例

    http(s)://[Endpoint]/?Action=DescribeProjectMeta
    &Labels=[{"name":"product","value":"NLB"}]
    &<公共请求参数>
  3. 根据返回参数,获取云监控中NLB数据命名空间Namespace的值为acs_nlb

    查看返回示例

    {
      "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\":\"网络型负载均衡\"}]",
            "Namespace": "acs_nlb"
          }
        ]
      },
      "Code": 200,
      "Success": true
    }

DescribeMetricMetaList

调用DescribeMetricMetaList接口查询云监控开放的时序类指标监控项描述,详情请参见DescribeMetricMetaList

  1. 登录OpenAPI开发者门户

  2. 将请求参数中数据命名空间Namespace的值设置为acs_nlb,其他参数保持默认值,然后单击发起调用

    查看请求示例

    http(s)://[Endpoint]/?Action=DescribeMetricMetaList
    &Namespace=acs_nlb
    &<公共请求参数>
  3. 根据返回参数,查看NLB的时序类指标监控项。

    查看返回示例

    {
      "TotalCount": 30,
      "RequestId": "9912911F-AEE2-52A0-AF4E-E0EC16F859E4",
      "Resources": {
        "Resource": [
          {
            "MetricName": "ActiveConnection",
            "Periods": "60,300",
            "Description": "监听每秒活跃连接数",
            "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": "监听每秒丢失连接数",
            "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": "监听每秒丢失入包数",
            "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": "监听每秒丢失出包数",
            "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": "监听每秒丢失入bit数",
            "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": "监听每秒丢失出bit数",
            "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": "监听非活跃连接数",
            "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": "实例活跃连接数",
            "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": "实例每秒丢弃连接数",
            "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": "实例每秒丢弃入包数",
            "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": "实例每秒丢弃出包数",
            "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": "实例每秒丢弃入bit数",
            "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": "实例每秒丢弃出bit数",
            "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": "实例每秒非活跃连接数",
            "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": "实例每秒最大并发连接数",
            "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": "实例每秒新建连接数",
            "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": "实例每秒入包数",
            "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": "实例每秒出包数",
            "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": "实例每秒入bit数",
            "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": "实例每秒出bit数",
            "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": "实例健康检查后端异常ECS实例个数",
            "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": "监听健康检查后端健康ECS实例个数",
            "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": "监听每秒流入数据包数",
            "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": "监听每秒流出数据包数",
            "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": "监听健康检查后端异常ECS实例个数",
            "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": "监听每秒最大连接数",
            "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": "监听新建连接数",
            "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": "Nlb实例健康后端个数",
            "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": "监听每秒入bit数",
            "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": "监听每秒出bit数",
            "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

调用DescribeMetricLast接口查询NLB指定监控对象的最新监控数据。本文以查看实例每秒新建连接数InstanceNewConnection的监控数据为例。详情请参见DescribeMetricLast

  1. 登录OpenAPI开发者门户

  2. 在请求参数中,设置查询InstanceNewConnection的以下请求参数,然后单击发起调用

    需要配置以下参数,其他参数可保持默认值。

    • MetricName:监控项名称,本文设置为InstanceNewConnection

    • Dimensions:维度map,用于查询指定资源的监控数据,本文设置为[{"instanceId":"nlb-defs3vztfty3nm****"}]

    • Namespace:产品的数据命名空间,用于区分不同的产品,本文设置为acs_nlb

    查看请求示例

    http(s)://[Endpoint]/?Action=DescribeMetricLast
    &MetricName=InstanceNewConnection
    &Namespace=acs_nlb
    &Dimensions=[{"instanceId":"nlb-defs3vztfty3nm****"}]
    &<公共请求参数>
  3. 根据返回参数,查看InstanceNewConnection的最新监控数据。

    查看返回示例

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

DescribeMetricList

调用DescribeMetricList接口查询NLB指定时间段内的时序指标监控数据,本文以查看指定时间段的实例每秒最大并发连接数的监控数据为例,详情请参见DescribeMetricList

  1. 登录OpenAPI开发者门户

  2. 在请求参数中,设置查询指定时间内InstanceMaxConnection的监控数据的请求参数,然后单击发起调用

    需要配置以下参数,其他参数可保持默认值。

    • MetricName:监控项名称。本文设置为InstanceMaxConnection

    • Namespace:产品的数据命名空间,用于区分不同的产品。本文设置为acs_nlb

    • Dimensions:维度map,用于查询指定资源的监控数据。本文设置为[{"instanceId":"nlb-q5515xt60rx5s2****"}]

    • StartTime:开始时间,StartTime不能等于或大于EndTime。本文设置为2022-10-13 20:45:03

      支持格式:

      • Unix时间戳:从1970年1月1日开始所经过的毫秒数。

      • Format格式:YYYY-MM-DDThh:mm:ssZ。

    • EndTime:结束时间,支持的格式和StartTime一致,本文设置为2022-10-13 20:47:03

    查看请求示例

    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
    &<公共请求参数>
  3. 根据返回参数,查看InstanceMaxConnection在指定时间内的监控数据。

    查看返回示例

    {
      "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
    }

通过SDK查看监控

介绍如何通过SDK查看NLB监控项和详细监控数据。本文以SDK调用DescribeMetricList接口查询NLB实例每秒最大并发连接数为例介绍。

您也可以下载SDK调用接口查看监控信息。更多信息,请参见SDK参考

  1. 登录OpenAPI开发者门户

  2. 在请求参数中,设置以下请求参数,其他参数可保持默认值。

    • MetricName:监控项名称。本文设置为InstanceMaxConnection

    • Namespace:产品的数据命名空间,用于区分不同的产品。本文设置为acs_nlb

    • Dimensions:维度map,用于查询指定资源的监控数据。本文设置为[{"instanceId":"nlb-q5515xt60rx5s2****"}]

    • StartTime:开始时间,StartTime不能等于或大于EndTime。本文设置为2022-10-13 20:45:03

      支持格式:

      • Unix时间戳:从1970年1月1日开始所经过的毫秒数。

      • Format格式:YYYY-MM-DDThh:mm:ssZ。

    • EndTime:结束时间,支持的格式和StartTime一致,本文设置为2022-10-13 20:47:03

  3. 选择SDK示例 > Python页签,单击运行示例

  4. 在该接口运行页,在下方弹出的运行面板中查看运行结果。