You can check the monitoring charts of a Gateway Load Balancer (GWLB) instance provided by the CloudMonitor service for the status and usage of the GWLB resources. You can choose one of the following ways to view the GWLB monitoring data: console, API, or SDK.
View monitoring data in the GWLB console
Log on to the GWLB console.
In the top navigation bar, select the region where the GWLB instance is deployed.
Choose one of the following methods to view the monitoring data.
View it on the Instances page:
On the Instances page, find the instance that you want to check, and click in the Monitoring column.
In the Monitoring Information panel, click the Instance and Zone tabs and view the monitoring data.
You can set Time to specify a period of time. If you enable Auto Refresh, the monitoring data is refreshed every minute.
View it on the Instance Details page:
On the Instances page, find the instance that you want to check, and click the instance ID. On the Instance Details tab, click the Monitoring Charts tab.
On the Monitoring Charts tab, click the Instance and Zone tabs and view the monitoring data.
You can set Time to specify a period of time. If you enable Auto Refresh, the monitoring data is refreshed every minute.
NoteFor detailed descriptions of GWLB monitoring metrics, see Monitoring.
The system displays the monitoring data for the last hour by default. You can set Time to view the monitoring data for the last 3 hours, 6 hours, or 12 hours, or select Custom and set the time period you want to view.
If you enable Auto Refresh, the monitoring data is refreshed every minute.
View monitoring data by calling the API
You can view the monitoring metrics and data of a GWLB instance using the CloudMonitor API.
Query monitoring data using the API as follows:
Query the namespace. Call the
DescribeProjectMeta
operation to query the namespace of GWLB in CloudMonitor.Optional: View available monitoring metrics. Call the
DescribeMetricMetaList
operation to query the description of time series metrics provided by CloudMonitor. Alternatively, you can refer to Monitoring for relevant information.Query the monitoring data of a specified metric.
Call the
DescribeMetricLast
operation to query the latest monitoring data of a specified monitoring object of GWLB.Call the
DescribeMetricList
operation to query the time series metric data of a specified monitored object of GWLB within a specified time period.
DescribeProjectMeta
Call the DescribeProjectMeta operation to query the namespace of GWLB in CloudMonitor.
Log on to the OpenAPI Portal.
Set Labels to
[{"name":"product","value":"GWLB"}]
and use the default values for other parameters.Get the value of Namespace for GWLB in CloudMonitor in the response. In the following example, it is
acs_gwlb
.
DescribeMetricMetaList
Call the DescribeMetricMetaList operation to query the description of time series metrics provided by CloudMonitor.
Log on to the OpenAPI Portal.
Set the value of Namespace to
acs_gwlb
and use the default values for other parameters.Check the description of time series metrics of GWLB in the response.
DescribeMetricLast
Call the DescribeMetricLast operation to query the latest monitoring data of a specified monitored object of GWLB.
Log on to the OpenAPI Portal.
Set the request parameters as follows to query the new connections per second.
Configure the following parameters and use the default values for the other parameters.
MetricName: The name of the metric. In this example, set to NewConnection.
Dimensions: The dimension map used to query the monitoring data of a specified resource. In this example, set to
[{"instanceId":"gwlb-0jl04f66daa388ec****"}]
.Namespace: The data namespace of the product used to distinguish different products. In this example, set to acs_gwlb.
Check the latest monitoring data of the new connections per second metric in the response.
{ "RequestId": "AE82B0D6-93E9-52E5-91F4-C0C6111BE244", "Period": "60", "Datapoints": "[{\"timestamp\":1728718500000,\"availableZone\":\"cn-wulanchabu-a\",\"instanceId\":\"gwlb-0jl04f66daa388ec****\",\"regionId\":\"cn-wulanchabu\",\"addressIpVersion\":\"ipv6\",\"userId\":\"1720210488521465\",\"Value\":0.0},{\"timestamp\":1728718500000,\"availableZone\":\"cn-wulanchabu-a\",\"instanceId\":\"gwlb-0jl04f66daa388ec****\",\"regionId\":\"cn-wulanchabu\",\"addressIpVersion\":\"dualstack\",\"userId\":\"1720210488521465\",\"Value\":1.0},{\"timestamp\":1728718500000,\"availableZone\":\"all\",\"instanceId\":\"gwlb-0jl04f66daa388ec****\",\"regionId\":\"cn-wulanchabu\",\"addressIpVersion\":\"dualstack\",\"userId\":\"1720210488521465\",\"Value\":1.0},{\"timestamp\":1728718500000,\"availableZone\":\"all\",\"instanceId\":\"gwlb-0jl04f66daa388ec****\",\"regionId\":\"cn-wulanchabu\",\"addressIpVersion\":\"ipv6\",\"userId\":\"1720210488521465\",\"Value\":0.0},{\"timestamp\":1728718500000,\"availableZone\":\"all\",\"instanceId\":\"gwlb-0jl04f66daa388ec****\",\"regionId\":\"cn-wulanchabu\",\"addressIpVersion\":\"ipv4\",\"userId\":\"1720210488521465\",\"Value\":1.0},{\"timestamp\":1728718500000,\"availableZone\":\"cn-wulanchabu-a\",\"instanceId\":\"gwlb-0jl04f66daa388ec****\",\"regionId\":\"cn-wulanchabu\",\"addressIpVersion\":\"ipv4\",\"userId\":\"1720210488521465\",\"Value\":1.0}]", "Code": "200", "Success": true }
DescribeMetricList
Call the DescribeMetricList operation to query the monitoring data of GWLB within a specified time period.
Log on to the OpenAPI Portal.
Set the request parameters as follows to query the monitoring data of the active connections metric within a specified time period.
Configure the following parameters and use the default values for the other parameters.
MetricName: the metric name. In this example, set it to ActiveConnection.
Namespace: the data namespace of the product used to distinguish different products. In this example, set it to acs_gwlb.
Dimensions: the dimension map used to query the monitoring data of a specified resource. In this example, set it to
[{"instanceId":"gwlb-0jl04f66daa388ec****"}]
.StartTime: the start time. StartTime cannot be the same as or later than EndTime. In this example, set it to
2024-10-12 15:30:00
.The following formats are supported:
UNIX timestamp: the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.
Date and time format: YYYY-MM-DDThh:mm:ssZ.
EndTime: the end time. It supports the same formats as StartTime. In this example, set it to
2024-10-12 15:31:00
.
Check the monitoring data of the active connections metric within the specified time period in the response.
View monitoring data by using the SDK
This section describes how to view the monitoring metrics and data of GWLB using the SDK. Calling the DescribeMetricList operation to query the active connections of a GWLB instance is described as an example.
You can also download the SDK to query the monitoring data.
Log on to the OpenAPI Portal.
Set the request parameters as follows. Use the default values for the other parameters.
MetricName: the metric name. In this example, set it to ActiveConnection.
Namespace: the data namespace of the product used to distinguish different products. In this example, set it to acs_gwlb.
Dimensions: the dimension map used to query the monitoring data of a specified resource. In this example, set it to
[{"instanceId":"gwlb-0jl04f66daa388ec****"}]
.StartTime: the start time. StartTime cannot be the same as or later than EndTime. In this example, set it to
2024-10-12 15:30:00
.The following formats are supported:
UNIX timestamp: the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.
Date and time format: YYYY-MM-DDThh:mm:ssZ.
EndTime: the end time. It supports the same formats as StartTime. In this example, set it to
2024-10-12 15:31:00
.
On the
tab, click Example.In the panel below, view the results.
References
For detailed descriptions of GWLB monitoring metrics, see Monitoring.