全部產品
Search
文件中心

Server Load Balancer:查看ALB監控資訊

更新時間:Jun 19, 2024

當您遇到應用型負載平衡ALB請求逾時、流量限速等網路連接問題,或者需要瞭解ALB的負載、效能等情況時,您可以利用CloudMonitor功能查看ALB資源的運行狀態和各個指標的使用方式,方便快速定位問題。您可以通過控制台、API、SDK方式來查看ALB的監控資訊。

通過ALB控制台查看監控

  1. 登入應用型負載平衡ALB控制台
  2. 在頂部功能表列,選擇ALB執行個體所屬的地區。

  3. 通過以下任意一種方式查看監控資訊。

    • 在執行個體列表頁面直接查看

      1. 執行個體頁面,找到目標執行個體,在監控列單擊monitor

      2. 在彈出的監控資訊面板,切換執行個體監聽VIP(可用性區域)頁簽,查看監控資訊。

    • 在執行個體詳情頁面查看

      1. 執行個體頁面,找到目標執行個體,單擊執行個體ID。在執行個體詳情頁簽,單擊監控圖表頁簽。

      2. 監控圖表頁簽,切換執行個體監聽VIP(可用性區域)頁簽,查看監控資訊。

    說明
    • 僅固定IP模式ALB執行個體支援查看VIP(可用性區域)相關指標監控項。若您需要設定ALB執行個體的VIP(可用性區域)指標警示規則請至CloudMonitor控制台,具體操作請參見設定ALB監控項警示規則

    • 如果是雙棧ALB執行個體,您可以在監控資訊面板左上方的指標類型下拉框中,選擇全部指標IPv4指標IPv6指標來分別查看相關指標。

    • 監聽頁簽,支援在監聽下拉框中,選擇該執行個體的其他監聽,查看所選監聽的指標;支援在維度下拉框中,選擇監聽伺服器組轉寄規則及具體的伺服器組ID和轉寄規則ID來分別查看相關的指標。

    • 您可以通過設定時間來調整監控圖表顯示的時間段。開啟自動重新整理後監控圖表每分鐘自動重新整理監控資料。

通過API查看監控

介紹如何通過CloudMonitorAPI查看應用型Server Load Balancer執行個體的監控項和詳細監控資料。

通過API查看監控資料流程,如下圖所示。monitoring

流程說明如下:

  1. 查看資料命名空間Namespace。調用DescribeProjectMeta介面查詢CloudMonitor中ALB的資料命名空間Namespace。

  2. 可選:查看已有監控項。調用DescribeMetricMetaList介面查詢CloudMonitor開放的時序類指標監控項描述或直接查看監控項說明,更多資訊,請參見ALB監控項說明

  3. 查看指定監控項的監控資料。

    • 調用DescribeMetricLast介面查詢ALB指定監控對象的最新監控資料。

    • 調用DescribeMetricList介面查詢ALB指定時間段內監控對象的時序指標監控資料。

DescribeProjectMeta

調用DescribeProjectMeta介面查詢CloudMonitor中ALB的資料命名空間Namespace,詳情請參見DescribeProjectMeta

  1. 登入OpenAPI開發人員門戶

  2. 將請求參數中警示產品標籤過濾Labels的值設定為[{"name":"product","value":"alb"}],其他參數保持預設值,然後單擊發起調用

    查看請求樣本

    http(s)://[Endpoint]/?Action=DescribeProjectMeta
    &Labels=[{"name":"product","value":"alb"}]
    &<公用請求參數>
  3. 根據返回參數,擷取CloudMonitor中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介面查詢CloudMonitor開放的時序類指標監控項描述,詳情請參見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. 在該介面運行頁,在下方彈出的運行面板中查看運行結果。

相關文檔