Most data generated by integrations is available in New Relic One dashboards, where you can query your data using NRQL and build custom dashboards. The following tips and sample queries were created for New Relic-built integrations, but most will also apply to integrations built with the Integrations SDK.
Here are some tips for finding and exploring your integration data in New Relic:
From the one.newrelic.com> Infrastructure > Third-party services page, select an integration dashboard. There, you can view the NRQL queries that generated a chart. For examples of NRQL queries for integration data, see the example queries.
When you create a useful query you'd like to add to your Insights dashboard, select Add to dashboard.
Example NRQL queries
Here are some examples of NRQL queries that use integration data:
Here's a NRQL query for the AWS EBS service, showing the total write time metric over the past day, faceted by displayName:
select average('provider.volumeTotalWriteTime.Sum') from BlockDeviceSample WHERE provider = 'EbsVolume' AND providerAccountId = '72' facet displayName TIMESERIES SINCE 1 day ago
Here's an Insights NRQL query for the number of messages in an Azure Service Bus topic queue, faceted by name:
SELECT average(activeMessages) from AzureServiceBusTopicSample TIMESERIES 5 minutes since 6 hours ago FACET displayName
Here's an Insights NRQL query for Azure Functions, showing the count of executed functions over the past six hours:
SELECT sum('functionExecutionCount.Total') FROM AzureFunctionsAppSample WHERE providerAccountId = '125' SINCE 6 hour ago TIMESERIES auto FACET displayName
Here's an Insights NRQL query for Azure VMs that compares the count of VM events over the past thirty minutes with the same time a week ago:
SELECT count(*) FROM AzureVirtualMachineSample SINCE 30 MINUTES AGO COMPARE WITH 1 WEEK AGO WHERE provider = 'AzureVirtualMachine' TIMESERIES
Here's an example of a query that you might run on your NGINX integration data and place in an Insights dashboard. This query creates a chart showing the average value of NGINX requests per second over time:
SELECT average('requestsPerSecond') as 'Requests' FROM NginxSample TIMESERIES until 1 minutes ago
For more on how to create queries, see NRQL syntax.
Here's an example of a query that you might run on your MySQL integration data. This query generates a chart showing active MySQL connections over time:
SELECT average('connectionsActive') as 'Active Connections' FROM MysqlSample TIMESERIES until 1 minutes ago
For more on how to create queries, see NRQL syntax.
Here's an example of a query that groups inventory change events from the last day by the type of change:
SELECT count(*) from InfrastructureEvent where format='inventoryChange' facet changeType since 1 day ago
Integrations can generate metric, event, and inventory data, all of which are available for querying in New Relic Insights. Here are some tips for using the different types of integration data in Insights:
Tips for finding and using integration metric data in Insights:
Metric values are treated as attributes: key-value pairs attached to an event. For example, the MySQL integration has an 'active connections' metric; this would be found by querying the connectionsActive attribute of the MysqlSample event.
Here are some tips for finding and using integration event data in Insights:
Most integration events are inventory change events. When inventory is changed, it generates an InfrastructureEvent with a format value of inventoryChange.
Integration data can be found via the data explorer.
Some inventory data is added as attributes (key-value pairs) to Insights data. For example, the AWS EC2 integration collects awsRegion as inventory data; this would be found in Insights by querying the awsRegion attribute of the ComputeSample event type and provider Ec2Instance.
When inventory data changes, an Insights InfrastructureEvent event type is generated with a format value of inventoryChange. See the query examples for an example of querying this data.