AWS API Gateway monitoring integration

Access to this feature depends on your subscription level. Requires Infrastructure Pro

New Relic Infrastructure integrations include an integration for reporting your AWS API Gateway data to New Relic products. This document explains how to activate this integration and describes the data that can be reported.

Features

Amazon's API Gateway is a fully managed service that allows you to create, publish, maintain, monitor, and secure APIs at any scale. With the New Relic API Gateway integration, you get more data about how your API layer is working behind the scenes. You'll receive metric data about the number of API calls, the requests served, the number of errors, latency counts, and more.

You can monitor and alert on your API Gateway data directly from New Relic Infrastructure, and query data and create dashboards in New Relic Insights.

Requirements

API Gateway will not send metrics unless you have explicitly enabled detailed CloudWatch metrics.

Enabling these metrics may add additional charges to your Amazon CloudWatch account pricing.

To enable CloudWatch metrics, use either of these options:

  • Go to the AWS Management Console, select the Settings option for CloudWatch, then select the option to enable detailed CloudWatch metrics.
  • Call the stage:update action of the AWS API Gateway REST API to update the metricsEnabled property to true.

Activate integration

To enable this integration:

  1. Make sure you have installed the Infrastructure agent before you activate AWS integrations from your Infrastructure account.
  2. Follow standard procedures to Connect AWS services to Infrastructure.

Configuration and polling

You can change the polling frequency and filter data using configuration options.

Default polling information for the AWS API gateway integration:

  • New Relic polling interval: 5 minutes
  • Amazon CloudWatch data interval: 1 minute

Find and use data

To find your integration data in Infrastructure, go to infrastructure.newrelic.com > Integrations > Amazon Web Services and select one of the API Gateway integration links.

In New Relic Insights, data is attached to the ApiGatewaySample event type.

For more on how to use your data, see Understand and use integration data.

Metric data

This New Relic Infrastructure integration collects the following Amazon API Gateway data:

Metric Description
4XXError The number of client-side errors captured
5XXError The number of server-side errors captured.
CacheHitCount The number of requests served from the API cache.
CacheMissCount The number of requests served from the back end when API caching is enabled.
Count The number of calls to API methods.
IntegrationLatency The time in milliseconds between when API Gateway relays a request to the back end and when it receives a response from the back end.
Latency The time in milliseconds between when API Gateway receives a request from a client and when it returns a response to the client. The latency includes the integration latency and other API Gateway overhead.

Inventory data

Inventory data provides information about the service's state and configuration. API Gateway configuration options are reported as inventory data. For more about inventory data, see Understand and use data.

Object Attributes
/aws/apigateway/api

apiId

apiName

awsRegion

/aws/apigateway/resource

awsRegion

methods

resource

resourceid

/aws/apigateway/stage

apiName

awsRegion

cacheClusterEnable

cacheClusterSize

cacheClusterStatus

lastUpdatedDate

stageName

/aws/apigateway/stage/variables

value

/aws/apigateway/stage/settings

CacheDataEncrypted

CacheTtlInSeconds

CachingEnabled

DataTraceEnabled

LoginLevel

MetricsEnabled

RequireAuthorizationForCacheControl

UnauthorizedCacheControlHeaderStrategy

ThrottlingBurstLimit

ThrottlingRateLimit

/aws/apigateway/stage/resource-with-metrics

apiName

awsRegion

method

resource

stageName

Dimensions

You can use the dimensions in the following table to filter API Gateway metrics.

Dimensions Description
ApiName Filters API Gateway metrics for an API of the specified API name.
ApiName, Method, Resource, Stage Filters API Gateway metrics for an API method of the specified API, stage, resource, and method.
ApiName, Stage Filters API Gateway metrics for an API stage of the specified API and stage.

For more help

Recommendations for learning more: