All Products
Search
Document Center

Server Load Balancer:View GWLB monitoring data

Last Updated:Nov 07, 2024

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

  1. Log on to the GWLB console.

  2. In the top navigation bar, select the region where the GWLB instance is deployed.

  3. Choose one of the following methods to view the monitoring data.

    • View it on the Instances page:

      1. On the Instances page, find the instance that you want to check, and click monitor in the Monitoring column.

      2. 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:

      1. 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.

      2. 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.

    Note
    • For 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.

image

Query monitoring data using the API as follows:

  1. Query the namespace. Call the DescribeProjectMeta operation to query the namespace of GWLB in CloudMonitor.

  2. 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.

  3. 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.

  1. Log on to the OpenAPI Portal.

  2. Set Labels to [{"name":"product","value":"GWLB"}] and use the default values for other parameters.

    View example request

    http(s)://[Endpoint]/?Action=DescribeProjectMeta
    &Labels=[{"name":"product","value":"GWLB"}]
    &<Common request parameters>
  3. Get the value of Namespace for GWLB in CloudMonitor in the response. In the following example, it is acs_gwlb.

    View example response

    {
      "RequestId": "3A3FA691-02EF-345F-B0F3-59748B25C674",
      "PageSize": 30,
      "PageNumber": 1,
      "Total": 1,
      "Resources": {
        "Resource": [
          {
            "Description": "Gateway Load Balancer",
            "Labels": "[{\"name\":\"product\",\"value\":\"GWLB\"},{\"name\":\"productCategory\",\"value\":\"gwlb\"},{\"name\":\"groupFlag\",\"value\":\"true\"},{\"name\":\"cnName\",\"value\":\"Gateway Load Balancer\"},{\"name\":\"enName\",\"value\":\"Gateway Load Balancer\"}]",
            "Namespace": "acs_gwlb"
          }
        ]
      },
      "Code": 200,
      "Success": true
    }

DescribeMetricMetaList

Call the DescribeMetricMetaList operation to query the description of time series metrics provided by CloudMonitor.

  1. Log on to the OpenAPI Portal.

  2. Set the value of Namespace to acs_gwlb and use the default values for other parameters.

    View example request

    http(s)://[Endpoint]/?Action=DescribeMetricMetaList
    &Namespace=acs_gwlb
    &<Common request parameters>
  3. Check the description of time series metrics of GWLB in the response.

    View example response

    {
      "TotalCount": 8,
      "RequestId": "841802F4-B8AC-5501-97A6-79F088C9D6FF",
      "Resources": {
        "Resource": [
          {
            "MetricName": "ActiveConnection",
            "Periods": "60,300",
            "Description": "Active connections",
            "Dimensions": "userId,regionId,availableZone,instanceId,addressIpVersion",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"count\"},{\"name\":\"productCategory\",\"value\":\"gwlb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"DefaultTemplate\",\"value\":\"false\"},{\"name\":\"metricCategory\",\"value\":\"Connection\"}]",
            "Unit": "count",
            "Statistics": "Value",
            "Namespace": "acs_gwlb"
          },
          {
            "MetricName": "NewConnection",
            "Periods": "60,300",
            "Description": "New connections per second",
            "Dimensions": "userId,regionId,availableZone,instanceId,addressIpVersion",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"count/s\"},{\"name\":\"productCategory\",\"value\":\"gwlb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"DefaultTemplate\",\"value\":\"false\"},{\"name\":\"metricCategory\",\"value\":\"Connection\"}]",
            "Unit": "count/s",
            "Statistics": "Value",
            "Namespace": "acs_gwlb"
          },
          {
            "MetricName": "PacketRX",
            "Periods": "60,300",
            "Description": "Packets received per second",
            "Dimensions": "userId,regionId,availableZone,instanceId,addressIpVersion",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"count/s\"},{\"name\":\"productCategory\",\"value\":\"gwlb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"DefaultTemplate\",\"value\":\"false\"},{\"name\":\"metricCategory\",\"value\":\"Packet\"}]",
            "Unit": "count/s",
            "Statistics": "Value",
            "Namespace": "acs_gwlb"
          },
          {
            "MetricName": "PacketTX",
            "Periods": "60,300",
            "Description": "Packets sent per second",
            "Dimensions": "userId,regionId,availableZone,instanceId,addressIpVersion",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"count/s\"},{\"name\":\"productCategory\",\"value\":\"gwlb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"DefaultTemplate\",\"value\":\"false\"},{\"name\":\"metricCategory\",\"value\":\"Packet\"}]",
            "Unit": "count/s",
            "Statistics": "Value",
            "Namespace": "acs_gwlb"
          },
          {
            "MetricName": "ServerGroupHealthyHostCount",
            "Periods": "60,300",
            "Description": "Healthy servers in a server group",
            "Dimensions": "userId,regionId,availableZone,instanceId,listenerId,serverGroupId",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"count\"},{\"name\":\"productCategory\",\"value\":\"gwlb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"DefaultTemplate\",\"value\":\"false\"},{\"name\":\"metricCategory\",\"value\":\"HealthyHost\"}]",
            "Unit": "count",
            "Statistics": "Value",
            "Namespace": "acs_gwlb"
          },
          {
            "MetricName": "ServerGroupUnhealthyHostCount",
            "Periods": "60,300",
            "Description": "Unhealthy servers in a server group",
            "Dimensions": "userId,regionId,availableZone,instanceId,listenerId,serverGroupId",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"count\"},{\"name\":\"productCategory\",\"value\":\"gwlb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"DefaultTemplate\",\"value\":\"false\"},{\"name\":\"metricCategory\",\"value\":\"HealthyHost\"}]",
            "Unit": "count",
            "Statistics": "Value",
            "Namespace": "acs_gwlb"
          },
          {
            "MetricName": "TrafficRX",
            "Periods": "60,300",
            "Description": "Bits received per second",
            "Dimensions": "userId,regionId,availableZone,instanceId,addressIpVersion",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"bit/s\"},{\"name\":\"productCategory\",\"value\":\"gwlb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"DefaultTemplate\",\"value\":\"false\"},{\"name\":\"metricCategory\",\"value\":\"Traffic\"}]",
            "Unit": "bit/s",
            "Statistics": "Value",
            "Namespace": "acs_gwlb"
          },
          {
            "MetricName": "TrafficTX",
            "Periods": "60,300",
            "Description": "Bits sent per second",
            "Dimensions": "userId,regionId,availableZone,instanceId,addressIpVersion",
            "Labels": "[{\"name\":\"minAlertPeriod\",\"value\":\"60\"},{\"name\":\"unitFactor\",\"value\":\"1\"},{\"name\":\"alertUnit\",\"value\":\"bit/s\"},{\"name\":\"productCategory\",\"value\":\"gwlb\"},{\"name\":\"is_alarm\",\"value\":\"true\"},{\"name\":\"DefaultTemplate\",\"value\":\"false\"},{\"name\":\"metricCategory\",\"value\":\"Traffic\"}]",
            "Unit": "bit/s",
            "Statistics": "Value",
            "Namespace": "acs_gwlb"
          }
        ]
      },
      "Code": 200,
      "Success": true
    }

DescribeMetricLast

Call the DescribeMetricLast operation to query the latest monitoring data of a specified monitored object of GWLB.

  1. Log on to the OpenAPI Portal.

  2. 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.

    View example request

    http(s)://[Endpoint]/?Action=DescribeMetricLast
    &MetricName=NewConnection
    &Namespace=acs_gwlb
    &Dimensions=[{"instanceId":"gwlb-0jl04f66daa388ec****"}]
    &<Common request parameters>
  3. 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.

  1. Log on to the OpenAPI Portal.

  2. 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.

    View request example

    http(s)://[Endpoint]/?Action=DescribeMetricList
    &MetricName=ActiveConnection
    &Namespace=acs_gwlb
    &Dimensions=[{"instanceId":"gwlb-0jl04f66daa388ec****"}]
    &StartTime=2024-10-12 15:30:00
    &EndTime=2024-10-12 15:31:00
    &<Common request parameters>
  3. Check the monitoring data of the active connections metric within the specified time period in the response.

    View return example

    {
      "RequestId": "49D60E8E-CFAB-5EBA-A1FA-794174F3F906",
      "Period": "60",
      "Datapoints": "[{\"timestamp\":1728718260000,\"availableZone\":\"cn-wulanchabu-a\",\"instanceId\":\"gwlb-0jl04f66daa388ec****\",\"regionId\":\"cn-wulanchabu\",\"addressIpVersion\":\"ipv6\",\"userId\":\"1720210488521465\",\"Value\":0.0},{\"timestamp\":1728718260000,\"availableZone\":\"cn-wulanchabu-a\",\"instanceId\":\"gwlb-0jl04f66daa388ec****\",\"regionId\":\"cn-wulanchabu\",\"addressIpVersion\":\"dualstack\",\"userId\":\"1720210488521465\",\"Value\":15726.0},{\"timestamp\":1728718260000,\"availableZone\":\"all\",\"instanceId\":\"gwlb-0jl04f66daa388ec****\",\"regionId\":\"cn-wulanchabu\",\"addressIpVersion\":\"dualstack\",\"userId\":\"1720210488521465\",\"Value\":15726.0},{\"timestamp\":1728718260000,\"availableZone\":\"all\",\"instanceId\":\"gwlb-0jl04f66daa388ec****\",\"regionId\":\"cn-wulanchabu\",\"addressIpVersion\":\"ipv6\",\"userId\":\"1720210488521465\",\"Value\":0.0},{\"timestamp\":1728718260000,\"availableZone\":\"all\",\"instanceId\":\"gwlb-0jl04f66daa388ec****\",\"regionId\":\"cn-wulanchabu\",\"addressIpVersion\":\"ipv4\",\"userId\":\"1720210488521465\",\"Value\":15726.0},{\"timestamp\":1728718260000,\"availableZone\":\"cn-wulanchabu-a\",\"instanceId\":\"gwlb-0jl04f66daa388ec****\",\"regionId\":\"cn-wulanchabu\",\"addressIpVersion\":\"ipv4\",\"userId\":\"1720210488521465\",\"Value\":15726.0}]",
      "Code": "200",
      "Success": true
    }

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.

  1. Log on to the OpenAPI Portal.

  2. 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.

  3. On the SDK Sample Code > Python tab, click Example.

  4. In the panel below, view the results.

References

For detailed descriptions of GWLB monitoring metrics, see Monitoring.