當您遇到網路型負載平衡NLB請求逾時、流量限速等網路連接問題,或者需要瞭解NLB的負載、效能等情況時,您可以利用CloudMonitor功能查看NLB資源的運行狀態和各個指標的使用方式,方便快速定位問題。您可以通過控制台、API、SDK方式來查看NLB的監控資訊。
通過控制台查看監控
- 登入網路型負載平衡NLB控制台。
在頂部功能表列,選擇NLB執行個體所屬的地區。
在執行個體頁面,您可以選擇以下任意一種方式查看監控。
在執行個體列表頁面直接查看
在執行個體頁面,找到目標執行個體,在監控列單擊。
在彈出的監控資訊面板,切換執行個體、監聽、VIP(可用性區域)頁簽,查看監控資訊。
在執行個體詳情頁面查看
在執行個體頁面,找到目標執行個體,單擊執行個體ID。
在執行個體詳情頁簽,單擊監控圖表頁簽。
在監控圖表頁簽,切換執行個體、監聽、VIP(可用性區域)頁簽,查看監控資訊。
說明關於NLB執行個體監控項詳細說明,請參見NLB監控項說明。
系統預設為您展示最近1小時內的監控資料,您可以選擇查看3小時內、6小時內或12小時內的監控資料,還可以選擇自訂,自訂需要設定查看的時間段。
開啟自動重新整理後監控圖表每分鐘自動重新整理監控資料。
通過API查看監控
介紹如何通過CloudMonitorAPI查看網路型Server Load Balancer執行個體的監控項和詳細監控資料。
通過API查看監控資料流程,如下圖所示。
流程說明如下:
查看資料命名空間Namespace。調用DescribeProjectMeta介面查詢CloudMonitor中NLB的資料命名空間Namespace。
可選:查看已有監控項。調用DescribeMetricMetaList介面查詢CloudMonitor開放的時序類指標監控項描述或直接查看監控項說明,更多資訊,請參見NLB監控項說明。
查看指定監控項的監控資料。
調用DescribeMetricLast介面查詢NLB指定監控對象的最新監控資料。
調用DescribeMetricList介面查詢NLB指定時間段內監控對象的時序指標監控資料。
DescribeProjectMeta
調用DescribeProjectMeta介面查詢CloudMonitor中NLB的資料命名空間Namespace,詳情請參見DescribeProjectMeta。
將請求參數中警示產品標籤過濾Labels的值設定為
[{"name":"product","value":"NLB"}]
,其他參數保持預設值,然後單擊發起調用。查看請求樣本
http(s)://[Endpoint]/?Action=DescribeProjectMeta &Labels=[{"name":"product","value":"NLB"}] &<公用請求參數>
根據返回參數,擷取CloudMonitor中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介面查詢CloudMonitor開放的時序類指標監控項描述,詳情請參見DescribeMetricMetaList。
將請求參數中資料命名空間Namespace的值設定為
acs_nlb
,其他參數保持預設值,然後單擊發起調用。查看請求樣本
http(s)://[Endpoint]/?Action=DescribeMetricMetaList &Namespace=acs_nlb &<公用請求參數>
根據返回參數,查看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。
在請求參數中,設定查詢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****"}] &<公用請求參數>
根據返回參數,查看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。
在請求參數中,設定查詢指定時間內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 &<公用請求參數>
根據返回參數,查看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參考。
在請求參數中,設定以下請求參數,其他參數可保持預設值。
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
。
選擇SDK樣本 > Python頁簽,單擊運行樣本。
在該介面運行頁,在下方彈出的運行面板中查看運行結果。