Use New Relic as a data source

Resources

Authentication: Include authentication in the query parameters
Sample Query https://api.newrelic.com/v2/applications/${APPID}/metrics/data.json
API Documentation New Relic API Documentation
Klip Gallery Save time and add pre-built Klips with the Klip Gallery
Klip Gallery: New Relic

Step-by-Step

Creating a data source using New Relic

To create a data source using New Relic data, you need to accomplish three tasks:

  • Start the data source creation process.
  • Write a query and enter it in Klipfolio. 
  • Add query parameters to the URL.

Step 1. Start the data source creation process

To create a data source using New Relic, go to the Connector Gallery page in Klipfolio and select New Relic.

Step 2: Write the query and enter it in Klipfolio 

Refer to the New Relic API Docs to learn more about writing a query. To help get you started, here are a few examples:

Base URL:

https://api.newrelic.com/v2/applications/${APPID}/metrics/data.xml

For average apdex score:

https://api.newrelic.com/v2/applications/${APPID}/metrics/data.xml?names[]=Apdex&names[]=EndUser/Apdex&values[]=score&from=2014-01-01T00:00:00+00:00&to=2014-01-02T00:00:00+00:00&summarize=true

When you have written a query, enter it into Klipfolio.

Step 3: Add query parameters

Each type of API call will have required parameters associated with it. Klipfolio lets you add query parameters to the URL using the (optional) Query Parameters builder. This builder will automatically add the parameters to the URL using the correct syntax.

These procedures will detail how to do that; however, you can apply these steps to other, optional, parameters.

To add parameters for the authentication, you will need an API Key. For more information, see New Relic's document on generating an API Key.

  1. Click the Query Parameters link.
  2. In the Name field, type X-Api-Key.
  3. In the Value field, type your-API-key (for example 2a123e123a1234b12a1234bc123456dc8c1234567aaba12).
  4. In the Type field, select Header.

Learn More

To learn more about JSON data and API Key authentication, check out these articles: