Connect to a New Relic data source
This section covers New Relic APM
Note
This data source is for Grafana Enterprise only. For more information, see Manage access to Enterprise plugins.
Additionally, in workspaces that support version 9 or newer, this data source might require you to install the appropriate plugin. For more information, see Extend your workspace with plugins.
Features
-
Template variables
-
Metric names
-
Metric values
-
-
Annotations
-
Aliasing
-
Metric names
-
Metric values
-
-
Ad-hoc filters
-
Not currently supported
-
-
Alerting
Configuration
Add the data source, filling out the fields for your admin API key
Usage
Service types
Aliases
You can combine plaintext with the following variables to produce custom output.
Variable | Description | Example value |
---|---|---|
$__nr_metric
|
Metric name | CPU/User time |
$__nr_metric_value
|
Metric values | average_value |
For example:
<para> Server: $__nr_server Metric: $__nr_metric </para> <programlisting>
Templates and variables
-
Create a template variable for your dashboard. For more information, see Templates and variables.
-
Select the "Query" type.
-
Select the "New Relic" data source.
-
Formulate a query using relative REST API
endpoints (excluding file extensions).
List of available applications:
<para> applications </para> <programlisting>
List of available metrics for an application:
<para> applications/{application_id}/metrics </para> <programlisting>
NRQL macros
To improve the writing experience when creating New Relic Query Language (NRQL) queries, the editor supports predefined macros:
-
$__timeFilter
(or[[timeFilter]]
) will interpolate toSINCE <from> UNTIL <to>
based on your dashboard’s time range.
Example:
<para> SELECT average(value) FROM $event_template_variable $__timeFilter TIMESERIES </para> <programlisting>
For further hints on how to use macros and template variables, refer to the editor’s help section.
Alert events
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, 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 a required field.