Help build the future of open source observability software Open positions

Check out the open source projects we support Downloads

Grot cannot remember your choice unless you click the consent notice at the bottom.

Introducing the new and improved New Relic plugin for Grafana

Introducing the new and improved New Relic plugin for Grafana

22 Jul, 2020 4 min

This post has been updated to reflect changes in the availability of the New Relic data source plugin for Grafana Cloud users.

It’s been a while, but the Kelly and Regis of Grafana Labs (a.k.a. Christine and Eldin of Solutions Engineering) are back to report on another Grafana Enterprise plugin: New Relic!

The latest version of this plugin is one of the many topics covered in the webinar All about Grafana plugins: Visualizing disparate data sources in one place, which you can watch on demand.

New and improved functionality

New Relic, known for inciting illuminating, a-ha moments based on the breadth and depth of data it provides users, can be added as a data source by users with a Grafana Cloud account or with a Grafana Enterprise license so you can keep your data where it currently lives without compromising how you visualize and transform it with Grafana. (Don’t have a Grafana Cloud account? Sign up for free now!)

More actionable dashboards

With the new plugin updates and some cool features from our Grafana 7.0 release (transformations, we’re looking at you!), you can create actionable dashboards that not only correlate New Relic data with metrics, logs, and traces from your other data sources. You can also perform additional math and aggregations on your data before they are passed to the visualization.

New Relic plugin for Grafana: New Relic system metrics
New Relic plugin for Grafana: New Relic system metrics

Template variables in NRQL

Arguably the most exciting change with the New Relic plugin 2.0 release is the ability to create template variables using the New Relic Query Language (NRQL). Previously, you were able to get a list of applications or components by typing something similar to this in the query field:

applications/data

What this would fetch as your variable are all applications that contain the word data in its name:

New Relic plugin for Grafana: Querying
New Relic plugin for Grafana: Querying

Now, you can use NRQL in your template variable query to capture the values you want. You can also add regex if you would like to further filter your variable with a capture group:

New Relic plugin for Grafana: NRQL
New Relic plugin for Grafana: NRQL

Due to this improvement, we’ve modified how you configure the New Relic data source in Grafana. Instead of using the Insights API key, you will now use the Personal API key:

New Relic API credentials
New Relic API credentials

If you’re more of a ditch-the-UI kind of user, here is how you would provision the New Relic plugin with a config file:

datasources:
  - name: NewRelic
    type: grafana-newrelic-datasource
    access: proxy
    editable: true
    enabled: true
    secureJsonData:
      accountId: <id>
      apiKey: <NRAA-...>
      personalApiKey: <NRAK-...>
    version: 1

Alerting

Besides the ability to use NRQL in template variables, there is a camp of users who will contend that alerting is the latest and greatest addition to the New Relic plugin. (Please don’t make us publicly choose!) Now, you can set up alert rules for your graph panels to send alerts to specific notification channels when certain thresholds are met.

A use case for how you can take advantage of transformations for alerting on New Relic data is utilizing a reduce transformation to calculate your alert thresholds (for example, the web transaction time of your applications). Instead of arbitrarily choosing a transaction time value on which to trigger alerts, you can first find the mean of your transaction times over the last week or two to establish a more informed baseline for what a healthy transaction time should be for a certain application.

Learn more about the New Relic plugin

The New Relic plugin is available for users with a Grafana Cloud account or with a Grafana Enterprise license. For more information or to get started, be sure to check out our New Relic solutions page or contact our team

Great catching up again, and don’t be a stranger on Twitter!

If you’re not already using Grafana Cloud — the easiest way to get started with observability — sign up now for a free 14-day trial of Grafana Cloud Pro, with unlimited metrics, logs, traces, and users, long-term retention, and access to one Enterprise plugin.