Introduction to the Metric API (original) (raw)

New Relic's Metric API can be used to send metric data to New Relic from a variety of sources. This API is how metrics from some of our integrations and exporters get into New Relic.

Want to try out our Metric API? Create a New Relic account for free! No credit card required.

What is the Metric API?

The Metric API is a way to get metric data into New Relic. The API works by sending a POST request to our HTTP endpoint with a JSON payload containing the metric data.

The Metric API is how metrics are ingested from some of our integrations, including our open source exporters (like DropWizard and Prometheus). The Metric API is also used by our Telemetry SDKs, which are language-specific tools that make it easier to use our data-ingest APIs.

The Metric API can be used to:

Requirements

Ensure outbound connectivity on TCP port 443 is allowed to the CIDR range that matches your region. The preferred configuration method is to use the DNS name metric-api.newrelic.com or metric-api.eu.newrelic.com.

You'll need a New Relic for the New Relic account you want to send data to. For information on limits and restricted attributes, see Metric API requirements and limits.

Get started

If we don't have an existing integration or quickstart that meets your metric-reporting needs, you have two options:

Find and use your data

You can find data sent via the Metric API (including from integrations that use this API) in these locations:

Alert on metric data

To alert on metrics created with the Metric API, use NRQL alert conditions: Select the NRQL category when defining your condition, then use the FROM Metric ... NRQL query syntax to express it. When you create these alert conditions, automatically uses the finest granularity data available (the raw metric data points) to evaluate alerts.

Data retention

All raw metric data points will be retained for 30 days. All additional aggregated data derived from the raw metric data points (for example, one-minute rollups) will be retained for 13 months. Any change to the retention period beyond such periods may result in a charge to you.

Troubleshooting

See Troubleshoot an NrIntegrationError event.