查看ALB监控信息

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

通过ALB控制台查看监控

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

  3. 通过以下任意一种方式查看监控信息。

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

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

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

    • 在实例详情页面查看

      1. 实例页面,找到目标实例,单击实例ID。在实例详情页签,单击监控图表页签。

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

    说明
    • 仅固定IP模式ALB实例支持查看VIP(可用区)相关指标监控项。若您需要设置ALB实例的VIP(可用区)指标报警规则请至云监控控制台,具体操作请参见设置ALB监控项报警规则

    • 如果是双栈ALB实例,您可以在监控信息面板左上角的指标类型下拉框中,选择全部指标IPv4指标IPv6指标来分别查看相关指标。

    • 监听页签,支持在监听下拉框中,选择该实例的其他监听,查看所选监听的指标;支持在维度下拉框中,选择监听服务器组转发规则及具体的服务器组ID和转发规则ID来分别查看相关的指标。

    • 您可以通过设置时间来调整监控图表显示的时间段。开启自动刷新后监控图表每分钟自动刷新监控数据。

通过API查看监控

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

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

流程说明如下:

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

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

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

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

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

DescribeProjectMeta

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

  1. 登录OpenAPI开发者门户

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

    查看请求示例

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

    查看返回示例

    {
      "RequestId": "4B68EC24-DBC8-54FB-8A97-16D9E775503F",
      "PageSize": 30,
      "PageNumber": 1,
      "Total": 1,
      "Resources": {
        "Resource": [
          {
            "Description": "应用型负载均衡",
            "Labels": "[{\"name\":\"product\",\"value\":\"alb\"},{\"name\":\"productCategory\",\"value\":\"alb\"},{\"name\":\"groupFlag\",\"value\":\"true\"},{\"name\":\"cnName\",\"value\":\"应用型负载均衡\"},{\"name\":\"enName\",\"value\":\"Application Load Balancer\"}]",
            "Namespace": "acs_alb"
          }
        ]
      },
      "Code": 200,
      "Success": true
    }

DescribeMetricMetaList

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

  1. 登录OpenAPI开发者门户

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

    查看请求示例

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

    查看返回示例

    {
      "TotalCount": 106,
      "RequestId": "FB432987-C687-596C-ABEF-F7033D00DEA8",
      "Resources": {
        "Resource": [
          {
            "MetricName": "ListenerActiveConnection",
            "Periods": "60,300",
            "Description": "client到ALB活跃连接数",
            "Dimensions": "userId,loadBalancerId,listenerProtocol,listenerPort",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"count\"},{\"name\":\"productCategory\",\"value\":\"alb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"listener\"}]",
            "Unit": "count",
            "Statistics": "Value",
            "Namespace": "acs_alb"
          },
          {
            "MetricName": "ListenerClientTLSNegotiationError",
            "Periods": "60,300",
            "Description": "每秒值, client到ALB由于TLS握手失败连接数",
            "Dimensions": "userId,loadBalancerId,listenerProtocol,listenerPort",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"count/s\"},{\"name\":\"productCategory\",\"value\":\"alb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"listener\"}]",
            "Unit": "count/s",
            "Statistics": "Value",
            "Namespace": "acs_alb"
          },
          {
            "MetricName": "ListenerHTTPCode2XX",
            "Periods": "60,300",
            "Description": "每秒值,返回2XX个数",
            "Dimensions": "userId,loadBalancerId,listenerProtocol,listenerPort",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"count/s\"},{\"name\":\"productCategory\",\"value\":\"alb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"listener\"}]",
            "Unit": "count/s",
            "Statistics": "Value",
            "Namespace": "acs_alb"
          },
          {
            "MetricName": "ListenerHTTPCode3XX",
            "Periods": "60,300",
            "Description": "每秒值,返回3XX个数",
            "Dimensions": "userId,loadBalancerId,listenerProtocol,listenerPort",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"count/s\"},{\"name\":\"productCategory\",\"value\":\"alb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"listener\"}]",
            "Unit": "count/s",
            "Statistics": "Value",
            "Namespace": "acs_alb"
          },
          {
            "MetricName": "ListenerHTTPCode4XX",
            "Periods": "60,300",
            "Description": "每秒值,返回4XX个数",
            "Dimensions": "userId,loadBalancerId,listenerProtocol,listenerPort",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"count/s\"},{\"name\":\"productCategory\",\"value\":\"alb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"listener\"}]",
            "Unit": "count/s",
            "Statistics": "Value",
            "Namespace": "acs_alb"
          },
          {
            "MetricName": "ListenerHTTPCode500",
            "Periods": "60,300",
            "Description": "每秒值,返回500个数",
            "Dimensions": "userId,loadBalancerId,listenerProtocol,listenerPort",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"count/s\"},{\"name\":\"productCategory\",\"value\":\"alb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"listener\"}]",
            "Unit": "count/s",
            "Statistics": "Value",
            "Namespace": "acs_alb"
          },
          {
            "MetricName": "ListenerHTTPCode502",
            "Periods": "60,300",
            "Description": "每秒值,返回502个数",
            "Dimensions": "userId,loadBalancerId,listenerProtocol,listenerPort",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"count/s\"},{\"name\":\"productCategory\",\"value\":\"alb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"listener\"}]",
            "Unit": "count/s",
            "Statistics": "Value",
            "Namespace": "acs_alb"
          },
          {
            "MetricName": "ListenerHTTPCode503",
            "Periods": "60,300",
            "Description": "每秒值,返回503个数",
            "Dimensions": "userId,loadBalancerId,listenerProtocol,listenerPort",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"count/s\"},{\"name\":\"productCategory\",\"value\":\"alb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"listener\"}]",
            "Unit": "count/s",
            "Statistics": "Value",
            "Namespace": "acs_alb"
          },
          {
            "MetricName": "ListenerHTTPCode504",
            "Periods": "60,300",
            "Description": "每秒值,返回504个数",
            "Dimensions": "userId,loadBalancerId,listenerProtocol,listenerPort",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"count/s\"},{\"name\":\"productCategory\",\"value\":\"alb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"listener\"}]",
            "Unit": "count/s",
            "Statistics": "Value",
            "Namespace": "acs_alb"
          },
          {
            "MetricName": "ListenerHTTPCode5XX",
            "Periods": "60,300",
            "Description": "每秒值,返回5XX个数",
            "Dimensions": "userId,loadBalancerId,listenerProtocol,listenerPort",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"count/s\"},{\"name\":\"productCategory\",\"value\":\"alb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"listener\"}]",
            "Unit": "count/s",
            "Statistics": "Value",
            "Namespace": "acs_alb"
          },
          {
            "MetricName": "ListenerHTTPCodeUpstream2XX",
            "Periods": "60,300",
            "Description": "每秒值,后端服务器返回的2XX个数",
            "Dimensions": "userId,loadBalancerId,listenerProtocol,listenerPort",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"count/s\"},{\"name\":\"productCategory\",\"value\":\"alb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"listener\"}]",
            "Unit": "count/s",
            "Statistics": "Value",
            "Namespace": "acs_alb"
          },
          {
            "MetricName": "ListenerHTTPCodeUpstream3XX",
            "Periods": "60,300",
            "Description": "每秒值,后端服务器返回的3XX个数",
            "Dimensions": "userId,loadBalancerId,listenerProtocol,listenerPort",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"count/s\"},{\"name\":\"productCategory\",\"value\":\"alb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"listener\"}]",
            "Unit": "count/s",
            "Statistics": "Value",
            "Namespace": "acs_alb"
          },
          {
            "MetricName": "ListenerHTTPCodeUpstream4XX",
            "Periods": "60,300",
            "Description": "每秒值,后端服务器返回的4XX个数",
            "Dimensions": "userId,loadBalancerId,listenerProtocol,listenerPort",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"count/s\"},{\"name\":\"productCategory\",\"value\":\"alb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"listener\"}]",
            "Unit": "count/s",
            "Statistics": "Value",
            "Namespace": "acs_alb"
          },
          {
            "MetricName": "ListenerHTTPCodeUpstream5XX",
            "Periods": "60,300",
            "Description": "每秒值,后端服务器返回的5XX个数",
            "Dimensions": "userId,loadBalancerId,listenerProtocol,listenerPort",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"count/s\"},{\"name\":\"productCategory\",\"value\":\"alb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"listener\"}]",
            "Unit": "count/s",
            "Statistics": "Value",
            "Namespace": "acs_alb"
          },
          {
            "MetricName": "ListenerHTTPFixedResponse",
            "Periods": "60,300",
            "Description": "每秒值,自定义的Response个数",
            "Dimensions": "userId,loadBalancerId,listenerProtocol,listenerPort",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"count/s\"},{\"name\":\"productCategory\",\"value\":\"alb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"listener\"}]",
            "Unit": "count/s",
            "Statistics": "Value",
            "Namespace": "acs_alb"
          },
          {
            "MetricName": "ListenerHTTPRedirect",
            "Periods": "60,300",
            "Description": "每秒值,重定向的个数",
            "Dimensions": "userId,loadBalancerId,listenerProtocol,listenerPort",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"count/s\"},{\"name\":\"productCategory\",\"value\":\"alb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"listener\"}]",
            "Unit": "count/s",
            "Statistics": "Value",
            "Namespace": "acs_alb"
          },
          {
            "MetricName": "ListenerHealthyHostCount",
            "Periods": "60,300",
            "Description": "健康的服务器数量",
            "Dimensions": "userId,loadBalancerId,listenerProtocol,listenerPort",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"count\"},{\"name\":\"productCategory\",\"value\":\"alb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"listener\"}]",
            "Unit": "count",
            "Statistics": "Value",
            "Namespace": "acs_alb"
          },
          {
            "MetricName": "ListenerInBits",
            "Periods": "60,300",
            "Description": "每秒值,进入ALB的bits数",
            "Dimensions": "userId,loadBalancerId,listenerProtocol,listenerPort",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"bit/s\"},{\"name\":\"productCategory\",\"value\":\"alb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"listener\"}]",
            "Unit": "bit/s",
            "Statistics": "Value",
            "Namespace": "acs_alb"
          },
          {
            "MetricName": "ListenerNewConnection",
            "Periods": "60,300",
            "Description": "每秒值,新建连接数",
            "Dimensions": "userId,loadBalancerId,listenerProtocol,listenerPort",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"count/s\"},{\"name\":\"productCategory\",\"value\":\"alb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"listener\"}]",
            "Unit": "count/s",
            "Statistics": "Value",
            "Namespace": "acs_alb"
          },
          {
            "MetricName": "ListenerNonStickyRequest",
            "Periods": "60,300",
            "Description": "每秒值,因其无法使用现有粘性会话而选择新目标的请求的数目",
            "Dimensions": "userId,loadBalancerId,listenerProtocol,listenerPort",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"count/s\"},{\"name\":\"productCategory\",\"value\":\"alb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"listener\"}]",
            "Unit": "count/s",
            "Statistics": "Value",
            "Namespace": "acs_alb"
          },
          {
            "MetricName": "ListenerOutBits",
            "Periods": "60,300",
            "Description": "每秒值,出ALB的bits数",
            "Dimensions": "userId,loadBalancerId,listenerProtocol,listenerPort",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"bit/s\"},{\"name\":\"productCategory\",\"value\":\"alb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"listener\"}]",
            "Unit": "bit/s",
            "Statistics": "Value",
            "Namespace": "acs_alb"
          },
          {
            "MetricName": "ListenerQPS",
            "Periods": "60,300",
            "Description": "每秒值,请求数",
            "Dimensions": "userId,loadBalancerId,listenerProtocol,listenerPort",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"count/s\"},{\"name\":\"productCategory\",\"value\":\"alb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"listener\"}]",
            "Unit": "count/s",
            "Statistics": "Value",
            "Namespace": "acs_alb"
          },
          {
            "MetricName": "ListenerRejectedConnection",
            "Periods": "60,300",
            "Description": "每秒值,超规格Drop的连接数",
            "Dimensions": "userId,loadBalancerId,listenerProtocol,listenerPort",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"count/s\"},{\"name\":\"productCategory\",\"value\":\"alb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"listener\"}]",
            "Unit": "count/s",
            "Statistics": "Value",
            "Namespace": "acs_alb"
          },
          {
            "MetricName": "ListenerRequestTime",
            "Periods": "60,300",
            "Description": "监听请求时延",
            "Dimensions": "userId,loadBalancerId,listenerProtocol,listenerPort",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"null\"},{\"name\":\"alertUnit\",\"value\":\"ms\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"productCategory\",\"value\":\"alb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"listener\"}]",
            "Unit": "ms",
            "Statistics": "Value",
            "Namespace": "acs_alb"
          },
          {
            "MetricName": "ListenerUnHealthyHostCount",
            "Periods": "60,300",
            "Description": "不健康的服务器数量",
            "Dimensions": "userId,loadBalancerId,listenerProtocol,listenerPort",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"count\"},{\"name\":\"productCategory\",\"value\":\"alb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"listener\"}]",
            "Unit": "count",
            "Statistics": "Value",
            "Namespace": "acs_alb"
          },
          {
            "MetricName": "ListenerUpstreamConnectionError",
            "Periods": "60,300",
            "Description": "每秒值,负载均衡器和目标之间连接建立不成功的次数",
            "Dimensions": "userId,loadBalancerId,listenerProtocol,listenerPort",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"count/s\"},{\"name\":\"productCategory\",\"value\":\"alb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"listener\"}]",
            "Unit": "count/s",
            "Statistics": "Value",
            "Namespace": "acs_alb"
          },
          {
            "MetricName": "ListenerUpstreamResponseTime",
            "Periods": "60,300",
            "Description": "后端应答时间",
            "Dimensions": "userId,loadBalancerId,listenerProtocol,listenerPort",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"ms\"},{\"name\":\"productCategory\",\"value\":\"alb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"listener\"}]",
            "Unit": "ms",
            "Statistics": "Value",
            "Namespace": "acs_alb"
          },
          {
            "MetricName": "ListenerUpstreamTLSNegotiationError",
            "Periods": "60,300",
            "Description": "每秒值,负载均衡器和目标之间TLS连接建立不成功的次数",
            "Dimensions": "userId,loadBalancerId,listenerProtocol,listenerPort",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"count/s\"},{\"name\":\"productCategory\",\"value\":\"alb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"listener\"}]",
            "Unit": "count/s",
            "Statistics": "Value",
            "Namespace": "acs_alb"
          },
          {
            "MetricName": "LoadBalancerActiveConnection",
            "Periods": "60,300",
            "Description": "client到ALB活跃连接数",
            "Dimensions": "userId,loadBalancerId",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"count\"},{\"name\":\"productCategory\",\"value\":\"alb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"loadBalancer\"}]",
            "Unit": "count",
            "Statistics": "Value",
            "Namespace": "acs_alb"
          },
          {
            "MetricName": "LoadBalancerClientTLSNegotiationError",
            "Periods": "60,300",
            "Description": "每秒值, client到ALB由于TLS握手失败连接数",
            "Dimensions": "userId,loadBalancerId",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"alertDefault\",\"value\":\"\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"count/s\"},{\"name\":\"productCategory\",\"value\":\"alb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"metricCategory\",\"value\":\"loadBalancer\"}]",
            "Unit": "count/s",
            "Statistics": "Value",
            "Namespace": "acs_alb"
          }
        ]
      },
      "Code": 200,
      "Success": true
    }

DescribeMetricLast

调用DescribeMetricLast接口查询ALB指定监控对象的最新监控数据。本文以查看监听健康的服务器数ListenerHealthyHostCount的监控数据为例。详情请参见DescribeMetricLast

  1. 登录OpenAPI开发者门户

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

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

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

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

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

    查看请求示例

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

    查看返回示例

    {
      "RequestId": "5CC32511-24DD-58B3-A1D3-D9715DC41F9D",
      "Period": "60",
      "Datapoints": "[{\"timestamp\":1663221840000,\"loadBalancerId\":\"alb-t93aj3yndojot5****\",\"listenerProtocol\":\"https\",\"listenerPort\":\"443\",\"userId\":\"1461700914926653\",\"Value\":1.0}]",
      "Code": "200",
      "Success": true
    }

DescribeMetricList

调用DescribeMetricList接口查询ALB指定时间段内的时序指标监控数据,本文以查看指定时间段的监听健康的服务器数的监控数据为例,详情请参见DescribeMetricList

  1. 登录OpenAPI开发者门户

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

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

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

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

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

    • StartTime:开始时间,StartTime不能等于或大于EndTime。本文设置为2022-09-14 14:10:00

      支持格式:

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

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

    • EndTime:结束时间,支持的格式和StartTime一致,本文设置为2022-09-14 14:11:00

    查看请求示例

    http(s)://[Endpoint]/?Action=DescribeMetricList
    &MetricName=RuleHealthyHostCount
    &Namespace=acs_alb
    &Dimensions=[{"loadBalancerId":"alb-2c9oquqqdcgbf8****"}]
    &StartTime=2022-09-14 14:10:00
    &EndTime=2022-09-14 14:11:00
    &<公共请求参数>
  3. 根据返回参数,查看RuleHealthyHostCount在指定时间内的监控数据。

    查看返回示例

    {
      "RequestId": "FECF5168-616A-584A-B149-A622348A01C3",
      "Period": "60",
      "Datapoints": "[{\"timestamp\":1663135860000,\"loadBalancerId\":\"alb-2c9oquqqdcgbf8****\",\"listenerProtocol\":\"https\",\"listenerPort\":\"443\",\"ruleId\":\"rule-default-lsn-icqehvs7afp600qcj8\",\"userId\":\"1461700914926653\",\"Value\":1.0}]",
      "Code": "200",
      "Success": true
    }

通过SDK查看监控

介绍如何通过SDK查看ALB监控项和详细监控数据。本文以SDK调用DescribeMetricList接口查询ALB实例活跃连接数为例介绍。

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

  1. 登录OpenAPI开发者门户

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

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

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

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

    • StartTime:开始时间,StartTime不能等于或大于EndTime。本文设置为2022-09-14 14:10:00

      支持格式:

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

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

    • EndTime:结束时间,支持的格式和StartTime一致,本文设置为2022-09-14 14:11:00

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

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

相关文档