For accounts on our original pricing plan, this document explains:
- How New Relic calculates billable usage for an Insights Pro subscription.
- Available subscription usage attributes and example NRQL queries to use in the New Relic UI or in API calls.
Only the account Owner and Admins can view the usage UI. However, anyone in your account can query usage data using the
To get an estimate of the current month's billable usage:
- Go to: account dropdown > Account settings > Usage.
- On the Insights usage page, set the time picker to Current month.
For more information about the usage UI, see Introduction to New Relic subscription usage data.
The Insights usage UI only displays paid events: these are events that count towards an Insights Pro subscription. It does not display events that are included free as part of other New Relic product subscriptions. However, you can also query the product included events.
Here are definitions of the column headers displayed in the UI table and CSV files. The columns you see depend on the Group by option you select in the UI.
|Account name||The name of the account. This can be a standalone account, a master account, or a partnership.|
|Account ID||New Relic account ID.|
|Event namespace||The category of event governed by Insights subscription. For example:
|Stored paid events||The number of events stored that count towards an Insights Pro subscription. Events included as part of other New Relic product subscriptions are not counted.|
|% of total usage||The percentage of the total usage used.|
Event namespaces (types)
An Insights Pro subscription governs the data retention of certain types of events. An event's namespace (indicated by the
insightsEventNamespace attribute) corresponds to one or more event types that share a single data retention policy.
|Event namespace in UI||Event namespace when queried||Event types|
|Page view timing||
Event types stored using custom filters created by New Relic. Not applicable for most customers.
Custom event types that you create using New Relic agents or the Event API
|Crash event trails||
|Mobile error (for HTTP requests and HTTP errors features)||
To get the most out of your Insights usage data, you can:
- Run queries of this data and create custom charts and dashboards.
- Use this data programmatically, using one of our APIs.
For general information about how to use NRQL queries, see Introduction to usage data.
Insights writes usage events once per day. That is why these queries use
since 24 hours ago or
timeseries 1 day.
Here are some NRQL query examples about usage.
- Stored event usage for last month
This query will tell you the "billable" number of Insights-governed events for all accounts (masters and sub-accounts) in the hierarchy under the account where the query is run, for the last calendar month. This number is calculated as the daily average number of stored events.
SELECT rate(sum(insightsTotalEventCount)-sum(insightsIncludedEventCount), 1 day) AS 'Paid events' FROM NrDailyUsage SINCE last month UNTIL this month
- Current Insights usage for an account
This query will tell you how many Insights-governed events are currently stored for a specific account, broken down by event namespace. Be sure to replace YOUR_ACCOUNT_ID in these queries with your account ID.
SELECT latest(insightsTotalEventCount) FROM NrDailyUsage SINCE 24 hours ago WHERE consumingAccountId = YOUR_ACCOUNT_ID FACET insightsEventNamespace
This query will tell you the total current Insights-governed event storage for a specific account, for all event namespaces:
SELECT sum(insightsTotalEventCount) FROM NrDailyUsage SINCE 24 hours ago WHERE consumingAccountId = YOUR_ACCOUNT_ID
- Current Insights usage for multiple accounts
This query will tell you how many Insights-governed events are currently stored for a list of accounts by event namespace. Note that you will need to replace LIST_OF_ACCOUNT_IDs in the query with a list of account IDs.
SELECT latest(insightsTotalEventCount) FROM NrDailyUsage SINCE 24 hours ago WHERE consumingAccountId IN (LIST_OF_ACCOUNT_IDs) FACET consumingAccountId, insightsEventNamespace LIMIT 100
You may need to increase the value in the
limitclause to see all of the facets in this query.
- Events included with other New Relic products
This query will tell you how many Insights-governed events that are included with other New Relic product subscriptions were stored for an account, by the product that created them, over the past seven days. Note that you will need to replace YOUR_ACCOUNT_ID in the query with your account ID.
SELECT sum(insightsIncludedEventCount) FROM NrDailyUsage SINCE 7 days ago WHERE consumingAccountId = YOUR_ACCOUNT_ID FACET insightsNrProduct TIMESERIES 1 day
- Retention periods by sub-account and event namespace
This query will tell you the total, paid, and included retention periods for the different event categories associated with the various New Relic products (such as APM
Transactionevents), for each sub-account under the specified master account ID. When creating your own NRQL queries, be sure to replace YOUR_ACCOUNT_ID with your specific account ID.
SELECT latest(insightsTotalRetentionInHours)/24 AS 'Total retention, days', latest(insightsIncludedRetentionInHours)/24 AS 'Included retention, days', (latest(insightsTotalRetentionInHours) - latest(insightsIncludedRetentionInHours))/24 AS 'Paid retention, days' FROM NrDailyUsage where productLine='Insights' AND masterAccountId = YOUR_ACCOUNT_ID FACET consumingAccountId,consumingAccountName,insightsEventNamespace SINCE 1 day ago
- Paid Insights usage by sub-account
This query will tell you how many events under an Insights Pro subscription are being consumed by each sub-account for the specified master account ID over the past seven days. When creating your own NRQL queries, be sure to replace YOUR_MASTER_ACCOUNT_ID in the query with your specific master account ID.
SELECT sum(insightsTotalEventCount)-sum(insightsIncludedEventCount) AS 'Paid events' from NrDailyUsage SINCE 7 days ago WHERE masterAccountId = YOUR_MASTER_ACCOUNT_ID FACET consumingAccountId, consumingAccountName TIMESERIES 1 day
- Account hierarchy
This query is useful for seeing the account hierarchy (partnership, master, sub-accounts).
SELECT count(*) FROM NrDailyUsage FACET partnershipName,masterAccountName,masterAccountId, consumingAccountName,consumingAccountId LIMIT 1000 SINCE 1 day ago