All Products
Search
Document Center

API Gateway:View monitoring data

Last Updated:Aug 21, 2023

This topic describes how to view the monitoring data of API calls in the API Gateway console as an administrator.

Overview

API Gateway allows you to view monitoring charts of regions, API groups, and APIs. The performance metrics of monitoring charts include traffic, processing delay, the distribution of HTTP status codes, and the number of requests.

1. Region monitoring

1.1 Log on to the API Gateway console.

1.2 In the left-side navigation pane, click Overview. On the Overview page, you can view the monitor icon, the number of API groups, the number of APIs, the number of running dedicated instances, and the number of dedicated instances that will expire in 10 days in each region. To view the monitoring charts of a region, find the region and click the monitor icon in the Monitor column.

1.3 The region monitoring feature provides API call statistics only for the past seven days. If APIs run on shared instances that are deployed in the classic network, the APIs are excluded from the statistics. You can view monitoring charts based on the following environments in which APIs are published: production, staging, and test environments. The monitoring data is collected based on the following performance metrics:

  • API QPS: the number of API requests.

  • API QPS by Instance: the number of API requests sent to an instance.

  • Traffic: the statistics about request traffic and response traffic.

  • Average Latency: the statistics about API Gateway processing delay and backend processing delay.

  • HTTP Status Code Statistics: the proportions of HTTP status codes.

2. Instance monitoring

2.1 The instance monitoring feature is available only to dedicated instances. Log on to the API Gateway console.

2.2 In the left-side navigation pane, click Instances. On the Instances page, click the Monitoring tab to go to the instance monitoring page.

2.3 The instance monitoring feature provides API call statistics only for the past seven days. You can view monitoring charts based on the following environments in which APIs are published: production, staging, and test environments. The monitoring data is collected based on the following performance metrics:

  • API Calls by Instance: the number of API requests sent to an instance.

  • Traffic: the statistics about request traffic and response traffic.

  • Average Latency: the statistics about API Gateway processing delay and backend processing delay.

  • HTTP Status Code Distribution: the distribution of HTTP status codes.

  • Concurrent Connections: the number of concurrent connections.

    • Active Connections Count: the number of active connections on the instance per second. Connections that are in the ESTABLISHED state are considered active connections. If persistent connections are used, multiple file requests can be transferred over a connection at the same time.

    • Inactive Connections Count: the number of inactive connections on the instance per second. Connections that are not in the ESTABLISHED state are considered inactive connections.

    • Maximum Concurrent Connections Count: the total number of established connections.

  • Packets: the number of packets.

    • Inbound Packets: the number of TCP packets received by the instance per second.

    • Outbound Packets: the number of TCP packets sent by the instance per second.

  • Discarded Packets: the number of dropped packets.

    • Inbound Packets Discarded per Second: the number of inbound TCP packets dropped per second.

    • Outbound Packets Discarded per Second: the number of outbound TCP packets dropped per second.

  • New Connections: the number of new connections established on the instance per second.

  • Discarded Connections: the number of connections dropped per second.

Note

API Gateway collects data that is transferred only over the Internet based on the preceding performance metrics, except for API Calls by Instance and Traffic.

3. Group monitoring

3.1 Log on to the API Gateway console.

3.2 In the left-side navigation pane, choose OpenAPI > API Groups. On the API Groups page, find the API group whose monitoring charts you want to view and click the monitor icon in the Monitor column.

3.3 The group monitoring feature provides API call statistics only for the past seven days. If APIs run on shared instances that are deployed in the classic network, the APIs are excluded from the statistics. You can view monitoring charts based on the following environments in which APIs are published: production, staging, and test environments. The monitoring data is collected based on the following performance metrics:

  • API QPS: the number of API requests.

  • Traffic: the statistics about request traffic and response traffic.

  • Average Latency: the statistics about API Gateway processing delay and backend processing delay.

  • HTTP Status Code Statistics: the proportions of HTTP status codes.

4. API monitoring

4.1 Log on to the API Gateway console.

4.2 In the left-side navigation pane, choose OpenAPI > APIs. Find the API whose monitoring charts you want to view and click the API name to go to the API details page.

4.3 In the left-side navigation pane, click Monitoring. On the page that appears, you can view the monitoring data of the previous seven days based on the following environments in which APIs are published: production, staging, and test environments. The monitoring data is collected based on the following performance metrics:

  • QPS: the numbers of successful requests and failed requests.

  • Traffic: the statistics about uplink traffic and downlink traffic.

  • Response Time: the response time of the backend service.

  • Error Distribution: the distribution of client errors and server errors.

Note

API Gateway provides API call statistics only for the past seven days. If you want to view statistics from a longer period or have other requirements, we recommend that you use Log Service. For more information, see Use Log Service to manage logs of API calls.