Oracle Cloud Infrastructure Documentation

API Gateway Metrics

You can monitor the health, capacity, and performance of API gateways and API deployments managed by the API Gateway service using metrics , alarms , and notifications.

This topic describes the metrics emitted by the API Gateway service in the oci_apigateway metric namespace.

Resources: gateways

Overview of the API Gateway Service Metrics

The API Gateway service metrics help you measure the connections to API gateways, and the quantity of data received and sent by API gateways. You can use metrics data to diagnose and troubleshoot API gateway and API deployment issues.

To view a default set of metrics charts in the Console, navigate to the API gateway you're interested in, and then click Metrics. You also can use the Monitoring service to create custom queries.

Prerequisites

IAM policies: To monitor resources, you must be given the required type of access in a policy  written by an administrator, whether you're using the Console or the REST API with an SDK, CLI, or other tool. The policy must give you access to the monitoring services as well as the resources being monitored. If you try to perform an action and get a message that you don’t have permission or are unauthorized, confirm with your administrator the type of access you've been granted and which compartment  you should work in. For more information on user authorizations for monitoring, see the Authentication and Authorization section for the related service: Monitoring or Notifications.

Available Metrics: oci_apigateway

The metrics listed in the following tables are automatically available for any API gateways you create. You do not need to enable monitoring on the resource to get these metrics.

API Gateway metrics include the following dimensions:

resourceId
The OCID  of the API gateway.
deploymentId
The OCID  of the API deployment.
route
The route path for API calls to the back-end service.
httpMethodType
The HTTP methods of incoming connections accepted by the back-end service (such as GET, HEAD, POST, PUT, DELETE).
httpStatusCode
The HTTP response status code received from the API gateway (such as 200, 201, 502, 504).
httpStatusCategory
The category of the HTTP response status code received from the API gateway (such as 2xx, 3xx, 4xx, 5xx).
backendType
The type of back end by which an API gateway routes requests to a back-end service (such as HTTP_BACKEND, ORACLE_FUNCTIONS_BACKEND, STOCK_RESPONSE_BACKEND).
backendHttpStatusCode
The HTTP response status code received from the back end (such as 200, 201, 502, 504).
backendHttpStatusCategory
The category of the HTTP response status code received from the back end (such as 2xx, 3xx, 4xx, 5xx).
Metric Metric Display Name Unit Description Dimensions

BytesReceived

Bytes Received Bytes Number of bytes received by the API gateway from front-end clients.

resourceId

deploymentId

route

httpMethodType

httpStatusCode

httpStatusCategory

backendType

BytesSent

Bytes Sent Bytes Number of bytes sent by the API gateway to front-end clients. resourceId

deploymentId

route

httpMethodType

httpStatusCode

httpStatusCategory

backendType

HttpRequests API Requests count Number of incoming front-end client requests to the API gateway. resourceId

deploymentId

route

httpMethodType

backendType

HttpResponses API Responses count Number of http responses that the API gateway has sent back. resourceId

deploymentId

route

httpMethodType

httpStatusCode

httpStatusCategory

backendType

BackendHttpResponses Backend Responses count Count of the HTTP responses returned by the back-end services. resourceId

deploymentId

route

httpMethodType

httpStatusCode

httpStatusCategory

backendType

backendHttpStatusCode

backendHttpStatusCategory

Latency Gateway Latency Seconds Average time that it takes for a request to be processed and its response to be sent. This is calculated from the time the API gateway receives the first byte of an HTTP request to the time when the response send operation is completed. resourceId

deploymentId

route

httpMethodType

httpStatusCode

httpStatusCategory

backendType

IntegrationLatency Backend Latency Seconds Time between the API gateway sending a request to the back-end service and receiving a response from the back-end service. resourceId

deploymentId

route

httpMethodType

httpStatusCode

httpStatusCategory

backendType

InternalLatency Internal Latency Seconds Time spent internally in the API gateway to process the request. resourceId

deploymentId

route

httpMethodType

httpStatusCode

httpStatusCategory

Using the Console

To view default metric charts for a single API gateway
To view default metric charts for all the API gateways in a compartment

Using the API

For information about using the API and signing requests, see REST APIs and Security Credentials. For information about SDKs, see Software Development Kits and Command Line Interface.

Use the following APIs for monitoring: