Monitor gateway performance through business metrics (QPS, success rate, RT) and resource metrics (CPU, memory, network I/O).
Prerequisites
View gateway monitoring analytics
Log on to the API Gateway console.
In the left-side navigation pane, click . In the top navigation bar, select a region.
-
On the Instance page, click your gateway instance.
-
In the navigation pane, choose .
-
The Business Monitoring page displays the following metrics:
-
Global Dashboard: PV, UV, gateway inbound traffic, gateway outbound traffic, Method distribution, Gateway status code distribution, Backend service status code distribution, QPS, request success rate, request response time (RT) (ms), and Request distribution.
-
Canary Release Comparison Dashboard: During phased releases, select a production and grayscale service to compare QPS, request success rate, request response time (RT) (ms), and Request distribution.
Note-
Data from the last hour is displayed by default. Set a custom time range in the upper-left corner to filter data.
-
Enable Auto Refresh in the upper-right corner to refresh data automatically.
-
Business monitoring uses Simple Log Service. Log delivery may incur fees. For more information about Simple Log Service billing, see Billing overview.
-
View gateway resource monitoring
Log on to the API Gateway console.
In the left-side navigation pane, click . In the top navigation bar, select a region.
-
On the Instance page, click your gateway instance.
-
In the navigation pane, choose .
-
The Resource Monitoring page displays metrics such as gateway CPU utilization (%), Memory payload (B), Gateway memory usage (%), Network inbound I/O payload (B/s), Network outbound I/O payload (B/s), Disk read payload (B/s), and Disk write payload (B/s).
Note-
Data from the last hour is displayed by default. Set a custom time range in the upper-left corner to filter data.
-
Enable Auto Refresh in the upper-right corner to refresh data automatically.
-
The business monitoring dashboard is free. Enterprise dashboards and data export require Hybrid Cloud Monitoring, which is usage-based. For more information about Cloud Monitor billing, see Billing overview.
-
-
-
(Optional) To configure alerts, click the
icon in the upper-right corner of a dashboard, or in the Cloud-native API Gateway console navigation pane, choose . Create an alert rule.
Integrate global dashboard data into Grafana
To view the global dashboard data of Cloud-native API Gateway in Grafana, integrate Cloud-native API Gateway through Cloud Monitor 2.0 and configure a Grafana data source.
Global dashboard business metrics are backed by Simple Log Service. Gateway envoy metrics, such as request count, response time, and inbound and outbound traffic, can be delivered to a Managed Service for Prometheus instance through metric delivery. Gateway resource metrics, such as CPU, memory, network I/O, and disk I/O, also come from Prometheus. Configure the matching data source in Grafana for the data that you want to view.
Prerequisites
-
Managed Service for Prometheus is activated.
-
Hybrid Cloud Monitoring is activated.
Procedure
-
Log on to the Cloud Monitor 2.0 console. In the left-side navigation pane, click Integration Center, search for Cloud-native API Gateway, and click it to start the integration.
-
Create or select a Policy Name, select the entity scope, select Cloud-native API Gateway Metric Monitoring and Cloud-native API Gateway Logs, and then click OK.
-
Log on to the Cloud Monitor console, choose Hybrid Cloud Monitoring > Metric Repository, and then click Integrate into Managed Service for Grafana in the Actions column of the target metric repository to obtain the URL, User, and Password.
-
In Grafana, add a Prometheus data source. Set URL to the obtained address, User to the
AccessKey ID, and Password to theAccessKey secret, and then click Save & Test.
View business metrics through an SLS data source
Global dashboard business metrics of Cloud-native API Gateway are stored in Simple Log Service. You can add a Simple Log Service data source to Grafana directly:
-
Managed Service for Grafana: Add a Simple Log Service data source in cloud service integration, and select the region, project, and Logstore.
-
Self-managed Grafana: Install the Simple Log Service data source plug-in, and configure the endpoint, project,
AccessKey ID, andAccessKey secret.
Log delivery must be enabled for the gateway. For instructions, see Enable log delivery for the gateway in Prerequisites. Use the project and Logstore shown in the gateway log delivery configuration in the console.