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.
For a general look at how to find and use integration data, see Understand integration data.
Get started with integration data
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.
- Use the data explorer or the dashboards to explore and understand the available data.
- Read the documentation for a specific integration to learn about the reported data.
- 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:
- AWS EBS query example
-
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
- Azure Service Bus query example
-
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
- Azure Functions query example
-
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
- Azure VMs query example
-
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
- NGINX query example
-
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.
- MySQL query example
-
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.
- Inventory change query example
-
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
You can also perform these queries using dimensional metrics.
Tips for using different data types
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:
- Metric data tips
-
Tips for finding and using integration metric data in Insights:
- All integration data is attached to a data type known as an event (not to be confused with events reported by integrations, which represent important activity in your host/service). This means that all integration data can be found via the data explorer. For more about these two basic New Relic data types, see New Relic data collection.
- 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 theMysqlSample
event.
For general information about metrics, see Integration metric data.
- Event data tips
-
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 aformat
value ofinventoryChange
. - Integration data can be found via the data explorer.
For general information about events, see Integration event data.
- Most integration events are inventory change events. When inventory is changed, it generates an
- Inventory data tips
-
Here are some tips for finding and using integration inventory data in Insights:
For general information about inventory data, see Integration inventory data.
- 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 theawsRegion
attribute of theComputeSample
event type and providerEc2Instance
. - When inventory data changes, an Insights
InfrastructureEvent
event type is generated with aformat
value ofinventoryChange
. See the query examples for an example of querying this data.
- Some inventory data is added as attributes (key-value pairs) to Insights data. For example, the AWS EC2 integration collects
For more on using NRQL queries, see Intro to NRQL.