Plugins 〉New Relic

Data Source

New Relic

  • Overview
  • Installation
  • Change log
  • Related content

New Relic Data Source

New Relic APM and Insights for Grafana.


  • Template variables
    • Metric names
    • Metric values
  • Annotations
  • Aliasing
    • Metric names
    • Metric values
  • Ad-hoc filters
    • Not currently supported
  • Alerting


  1. Install.
  2. Add the data source; filling out the fields for your personal API key/user API key and account ID.


Service Types

  1. Metrics: for querying New Relic APM via New Relic's REST API.
  2. Insights: for querying New Relic Insights via NRQL.


You can combine plain text with the following variables:

VariableDescriptionExample value
$__nr_metricMetric nameCPU/User time
$__nr_metric_valueMetric valuesaverage_value

…to produce custom output. For example:

Server: $__nr_server Metric: $__nr_metric

Templates and Variables

  1. Create a template variable for your dashboard.
  2. Select the "Query" type.
  3. Select the "New Relic" data source.
  4. Formulate a query using relative REST API endpoints (excluding file extensions).

List of available applications:


List of available metrics for an application:


NRQL Macros

In order to improve the writing experience when creating NRQL queries, the editor supports predefined macros:

  • $__timeFilter (or [[timeFilter]]) will interpolate to SINCE <from> UNTIL <to> based on your dashboard's time range.


SELECT average(value) FROM $event_template_variable $__timeFilter TIMESERIES

For further hints on how to use macros and template variables, refer to the editor's help section.

Alert Events

Annotations editor (alerts)

Select your New Relic data source and set additional filters. Without any filters set, all events will be returned.

If you want to filter events by Entity ID, please use template variables because you will be able to select the entity name instead of ID. For example, to filter events for a particular application, create a variable _$app_ which retrieves a list of apps and uses it as an Entity ID filter.

Deployment Events

Application ID is required field.

Annotations editor (deployments)

For more information, visit the docs on plugin installation.

Change Log

[2.1.2] - 2021-6-14

  • Bug fix: Fixed a bug where some NRQL queries return duplicate rows
  • Bug fix: Fixed a bug where annotations doesn't show up for deployments
  • Bug fix: Fixed a bug where template variables in metrics query doesn't work
  • Bug fix: Fixed a bug where insights type suggestions not applied when pressed enter
  • In Insights editor, now ctrl+s key runs the query

[2.1.1] - 2021-4-12

  • Chore: Update SDK

[2.1.0] - 2021-03-25

  • Replace Metric Select dropdown with Cascader
  • Remove deprecated admin key from Config Editor
  • Fix interpolate template variables for metric values
  • Allow custom label to be created for metric values
  • Return error for Insights query and health check with invalid credentials

[2.0.19] - 2021-02-10

  • NRQL Queries fail against metric table
  • Aliases no longer work
  • Value field not a multi-select, and when selecting '--remove--' the value stays as the actively selected item
  • Health check succeeds even if one of the API Keys is bad
  • New Relic: support for Insights query when query length > 4k characters

[2.0.18] - 2020-12-14

  • Changed the metric selector to only show results when the user starts typing

[2.0.17] - 2020-12-14

  • Updated config editor to allow empty Admin API keys now that the Admin API key and Personal API key have merged

[2.0.16] - 2020-11-19

  • Fixed insights query change event sending a string instead of a query object

[2.0.15] - 2020-11-17

  • Fixed issue where an unnecessary query was being ran whenever the datasource was selected
  • Added the ability to "Remove" or "Reset" the "metric" selection dropdown
  • Changed the default query method to "metricData" from "sourceList"

[2.0.14] - 2020-11-17

  • Fixed issue where unnecessary queries were being sent before the form was completely filled out
  • Fixed issue where metrics were not displaying

[2.0.13] - 2020-11-09

  • Fixed issue where querying many applications causes performance issues

[2.0.12] - 2020-11-06

  • Fix issue where errors were not being logged

[2.0.11] - 2020-11-04

  • Fix caching issue

[2.0.10] - 2020-11-04

  • Client side caching experimental/temporary feature

[2.0.9] - 2020-11-02

  • Fixed issue with parsing the datasource settings

[2.0.8] - 2020-11-02

  • Removed application list in healthcheck
  • Upgraded newrelic-client-go to v0.47.3
  • Updated framing logic

[2.0.7] - 2020-07-23

  • Fix for additional time range bug

[2.0.6] - 2020-07-23

  • Fix for metric data time range
  • Fix for hide/show data in query editor

[2.0.5] - 2020-07-21

  • Fix compatibility issues with previous single values:
  • metric, value are now metrics and values (arrays) to support multi-value template variables

[2.0.4] - 2020-07-14

  • Fix multi-value template variables in insights queries

[2.0.3] - 2020-06-10

  • Fix template variables with insights queries

[2.0.2] - 2020-06-02

  • fix release process

[2.0.1] - 2020-06-01

  • Fix for query editor not releasing the cursor
  • Better handling in queries for null return values

[2.0.0] - 2020-05-18

New Features

  • Works with Grafana 7+
  • Supports alerting
  • Alias now supports "$__nr_metric" and "$__nr_metric_value"
  • NRQL supported in template variables

Breaking Changes

  • Authentication switched to using "admin key" and "personal key"

[1.4.0] - 2020-03-27

  • Update components to fix insight query bug

[1.3.0] - 2019-04-18

  • Upgrade of Slate component to make the plugin compatible with Grafana 6.4. Breaking change so is not backward compatible with previous versions of Grafana

[1.2.0] - 2019-04-18

  • Multi-value variables support
  • Query editor styles in Grafana 6
  • Panel refresh on search field blur
  • Queries with percentiles

[1.1.0] - 2019-03-27

  • Support queries with percentiles
  • Queries with FACET keyword and without TIMESERIES
  • Plugin tries to pull metric list from APM in Insights mode

[1.0.0] - 2018-09-25

  • Support for annotations for Insights API
  • Improved NRQL query editor with intellisense

[0.4.1] - 2018-08-02

  • Support queries without TIMESERIES

[0.4.0] - 2018-08-01

  • Support for NewRelic Insights API
  • NRQL query editor with intellisense

[0.3.4] - 2018-03-29

  • Able to get application deployments as annotation

[0.3.3] - 2018-03-05

  • Replace variables in metric find query

[0.3.2] - 2017-11-13

  • Optional name filters for apps/servers/plugins in template variable editor
  • Filter apps/servers/plugins by name on the NewRelic side (add filter param to API calls)
  • Template variable rendering in selection dropdown

[0.2.1] - 2017-05-22

  • Add data source (with default name New Relic) automatically when configure app
  • JSON.parse error when using variable with single value selected as metric

[0.2.0] - 2017-05-17

  • Initial release