Important
This doc is for accounts on our original Product-based pricing. If you're on the newer pricing model, see New Relic One pricing model. Not sure which you're on? See Overview of pricing models.
For accounts on our original pricing model, the usage UI lets you predictably track your data usage, and see how that may affect your pricing. This document explains how the subscription usage UI works, and how you can query and retrieve the usage data you need.
To view your usage data:
- If you are an account owner or admin, you can access subscription usage data in the New Relic UI.
- If you are not the account owner or admin, you can query usage data by using the
NrDailyUsage
event.
How it works
Tip
Owner and Admins
The subscription usage UI shows how much a New Relic product is being used, and how that usage might affect your account's subscription level and pricing. For example, you can see:
- How much your organization's departments or child accounts are contributing to billable New Relic usage. This is useful, for example, if your organization uses IT chargebacks.
- How close you are to going above your Insights Pro subscription level.
To understand your product usage, use any of these resources:
- View Usage UI pages to get an overview of your New Relic product usage.
- Download usage data CSVs and use other UI features.
- Run NRQL queries or use Insights query API calls to retrieve focused usage data.
View usage data in UI
Tip
Only the account Owner and Admins can view the usage UI. However, anyone in your account can query usage data using the NrDailyUsage
event.
To view New Relic subscription usage data:
- Go to the usage UI.
- For an overview of account usage across all products, select Usage.
- To view usage for a specific product, select its Usage page.
For organizations on our original pricing model, owners and admins can view usage for all products, or view it by product.
Every New Relic product has its own unit of measurement to calculate usage. For example, Mobile tracks monthly active users. Aside from the unit of measurement, the UI charts and features are similar for all products.
UI features
Here are some of the general features available on New Relic usage UI pages. For product-specific UI and calculation details, see the product usage documentation.
If you want to... | Do this... |
---|---|
Switch time range | Use the Time picker to switch between the view of the data from the current calendar month and the data from the last 30 days. All time measurements in the UI use Coordinated Universal Time (UTC). |
Switch to different account levels | To select account levels, such as customer partnerships, parent accounts, and child accounts, select Scope to. |
Download CSV | On product-specific usage pages, select Download CSV to get a comma-separated value file. The columns and data in the CSV match the data shown in the UI. |
Group data | On product-specific pages, the default chart view is organized by Account name. To switch to other ways of grouping your data, such as by application or host, select Group by. |
View query | Mouse over a chart and select , then select View query. |
See chart segment details | To display more details on charts with multiple segments, mouse over any segment. |
Query usage data
New Relic stores your usage data as an NrDailyUsage
event type. The usage charts have an associated NRQL query that is close to what you see in the UI.
For product-specific attributes and example NRQL queries, keep reading.
For accounts on our original pricing model, our usage UI lets you predictably track your data usage, and see how that may affect your pricing. This document explains how New Relic calculates billable usage for APM accounts that have CU-based pricing (not host-based pricing), and also provides available subscription usage attributes and example NRQL queries to use in the New Relic UI or with API calls.
Data generation
Once per day, an APM account will generate an NrDailyUsage
event for:
- Every application instance created over the last 24 hours
- Every unique host on which an application instance existed over the last 24 hours
These two types of events allow your usage data to be queried and analyzed in many different ways. To query the application events, use a usageType
attribute value of Application
. To query the host events, use a usageType
attribute value of Host
.
All APM events use a productLine
attribute value of APM
. For more information, see APM query examples.
Usage calculations
Monthly billable CUs for a host are calculated by the size of the host running APM (number of CPUs + GBs of RAM) multiplied by the number of hours the host is connected to New Relic during that month. For more on how this is calculated, see CU-based pricing.
Tip
Only the account Owner and Admins can view the usage UI. However, anyone in your account can query usage data using the NrDailyUsage
event.
To get an estimate of the current month's eventual billable CUs:
- Go to the usage UI.
- On the APM usage page, set the time picker to Current month.
- Multiply the Avg daily compute units by the number of days in the current month.
For more information about the usage UI, see Intro to subscription usage data.
Table definitions
Here are definitions of the column headers displayed in the UI table and CSV files. The columns visible depend on the Group by option selected at the top of the page.
Header | Definition |
---|---|
Account name | The name of the account. This can be a standalone account, a parent account or a customer partnership. |
Host ID | The unique identifier for that host. If the host is in AWS, we use the AWS-provided instance ID. For other hosts, New Relic assigns a host ID. For more about how this value is created, see |
Agent hostname | The name of the host, as reported by the agent. For more about this value, see |
Average daily compute units | The average daily compute units used. |
% of total usage | The percentage of the total usage used. |
Query examples
Here are some examples of NRQL queries you can use with your account usage data.
SELECT sum(apmComputeUnits) FROM NrDailyUsage WHERE usageType='Host' AND productLine='APM' SINCE last month UNTIL this month
SELECT SUM(apmComputeUnits)FROM NrDailyUsageWHERE usageType='Host' AND productLine='APM'FACET monthOf(timestamp) SINCE 12 month ago limit 13
This query measures the total number of CUs used by all instances (processes) of an application in the last 24 hours. It's useful for determining which applications are responsible for APM usage, but does not return results that match precisely how New Relic prices APM usage.
Each application instance is counted separately in this query, even if it runs concurrently with another application instance on the same host, so the number of application instance-hours is likely to be greater than the number of host-hours (the billable quantity).
SELECT sum(apmComputeUnits) FROM NrDailyUsage WHERE usageType='Application' AND productLine='APM' FACET consumingAccountName,consumingAccountId,apmAppName SINCE 1 day ago LIMIT 2000
This query returns data once provided in the "host usage report": a listing of applications running on each host. Note that while APM usage is counted on an hour-by-hour basis, per-hour usage data is no longer available via the API or UI.
FROM NrDailyUsage SELECT min(timestamp) AS 'Earliest reporting day',max(timestamp) AS 'Latest reporting day' FACET apmAppName,hostId,agentHostname,consumingAccountName,consumingAccountId WHERE usageType='Application' AND productLine='APM' SINCE 1 month ago LIMIT 2000
This query produces a close approximation of the CSV report you would have gotten in the deprecated UI system:
FROM NrDailyUsage SELECT consumingAccountId AS 'Account ID', hostId, cloudProvider AS 'Host provider', cloudInstanceType AS 'Instance type', apmBillingInstanceSize AS 'Instance size', apmHoursUsed AS 'Hours used', apmComputeUnits AS 'Usage (CU)', apmMemoryBytes/(1024*1024*1024) AS 'Total RAM', apmProcessorCount AS 'Logical processors', apmContainerCount AS 'Container count', apmComputeUnitRule AS 'Business rule', missingCpuData, missingRamData, instanceSizeCapped, cloudZone, cloudInstanceId WHERE productLine='APM' AND usageType='Host' SINCE 1 day ago LIMIT 2000
This NRQL query is different than the legacy usage report:
Per-host query | Comments |
---|---|
Time period | This query includes only the last 24 hours of usage. To see the usage aggregated over a longer time period, change the |
Results limited to a maximum number of rows | NRQL limits the number of rows returned. If you have more hosts than the maximum number of rows returned and want to get the complete set of hosts, you can narrow your query with more |
Docker container IDs | A single Docker container ID does not appear in this report. A Docker container ID is reported only at the application instance level of granularity ( For the host ( |
Business rule |
|
Use this query to see which agent versions are running on your applications in the last 24 hours. This information can be useful in determining whether the agent needs to be upgraded to report a more accurate host name in a Docker container environment (either a Linux boot ID or a cloud provider instance ID).
FROM NrDailyUsage SELECT count(*) WHERE productLine='APM' AND usageType='Application' FACET consumingAccountId, consumingAccountName, apmAppName, apmAgentVersion, apmLanguage SINCE 1 day ago LIMIT 2000
This query helps identify applications where an agent is reporting a hostname that may be the same as a container ID. The result of the query is not a definitive list of such applications, but helps you determine which applications may be affected.
Hosts that are inaccurately named after a Docker container will have a hostId
value that is the same as the first part of the containerId
value. The apmComputeUnitRule != ‘cloud_provider_data’
clause removes from consideration hosts that are named by the cloud provider and thus not named after an ephemeral container.
FROM NrDailyUsage SELECT latest(hostId) WHERE containerId is not null AND apmComputeUnitRule != 'cloud_provider_data' AND productLine='APM' AND usageType='Application' FACET consumingAccountId,apmAppName,apmAgentVersion,apmLanguage,containerId SINCE 1 day ago LIMIT 2000
This query is useful for seeing the account hierarchy (partnership, parent, child accounts).
SELECT count(*) FROM NrDailyUsage FACET partnershipName, masterAccountName, masterAccountId, consumingAccountName, consumingAccountId LIMIT 2000 SINCE 1 day ago
Use of Docker or other containers
Some previous APM agents may miscount containers as hosts, which may lead to over-reporting of compute unit (CU) usage.
To fix this calculation for Linux-based containers (including Docker), upgrade your APM agent to these versions:
- Go: 1.11 or higher
- Java: 3.42.0 or higher
- .NET: 6.19.330.0 or higher
- Node.js: 2.1.0 or higher
- PHP: 7.5.0.199 or higher
- Python: 2.90.0.75 or higher
- Ruby: 4.4.0.336 or higher
For accounts on our original pricing model, this explains how New Relic calculates billable usage for APM accounts that have host-based pricing (not CU-based pricing). This document also provides available subscription usage attributes and example NRQL queries to use in the New Relic UI or with API calls.
Data generation
Once per day, an APM account will generate an NrDailyUsage
event for:
- Every application instance that existed during the last 24 hours
- Every unique host on which an application instance ran during the last 24 hours
These two types of events allow your usage data to be queried and analyzed in many different ways. To query the application events, use a usageType
attribute value of Application
. To query the host events, use a usageType
attribute value of Host
.
All APM events use a productLine
attribute value of APM
. For more information, see APM query examples.
Usage calculations
For host-based APM pricing, monthly billable usage is determined by the number of equivalent hosts used during that month. An equivalent host is defined as: 750 hours (standardized number of monthly hours) of connection to New Relic by a host or multiple hosts. For more on this calculation, see host-based pricing.
Tip
Only the account Owner and Admins can view the usage UI. However, anyone in your account can query usage data using the NrDailyUsage
event.
To get an estimate of the current month's billable usage:
- Go to the usage UI.
- On the APM usage page, set the time picker to Current month.
- See the Avg daily equivalent hosts for an account or grouping of accounts.
The UI is meant to estimate your host usage but, especially for cloud environments, your usage may go up or down over time.
Query examples
Here are some examples of NRQL queries you can use with your account usage data. You can run NRQL queries and use the resulting charts in dashboards.
This query uses New Relic’s standard number of hours per month (750) for the purpose of calculating APM equivalent hosts over the last month.
SELECT sum(apmHoursUsed)/750 AS 'Equivalent hosts' FROM NrDailyUsage WHERE usageType='Host' AND productLine='APM' SINCE last month UNTIL this month
New Relic records usage per application instance, not strictly per application. This query gives an approximation of the usage for a given application on a given host. If unique application instances run sequentially on a host within a given day, this query could return an underestimate (this would be likely, for example, in a container environment).
SELECT max(apmHoursUsed) FROM NrDailyUsage WHERE usageType='Application' AND productLine='APM' FACET consumingAccountName,consumingAccountId,apmAppName,hostId SINCE 1 day ago LIMIT 2000
This query measures the total number of hours used by all instances (processes) of an application in the last 24 hours. It's useful for determining which applications are responsible for APM usage, but does not return results that match precisely how New Relic prices APM usage.
Each application instance is counted separately in this query, even if it runs concurrently with another application instance on the same host, so the number of application instance-hours is likely to be greater than the number of host-hours (the billable quantity).
SELECT sum(apmHoursUsed) FROM NrDailyUsage WHERE usageType='Application' AND productLine='APM' FACET consumingAccountName,consumingAccountId,apmAppName SINCE 1 day ago LIMIT 2000
Use this query to see which agent versions are running on your applications in the last 24 hours. This information can be useful in determining whether the agent needs to be upgraded to report a more accurate host name in a Docker container environment (either a Linux boot ID or a cloud provider instance ID).
FROM NrDailyUsage SELECT count(*) WHERE productLine='APM' AND usageType='Application' FACET consumingAccountId, consumingAccountName, apmAppName, apmAgentVersion, apmLanguage SINCE 1 day ago LIMIT 2000
This query is useful for seeing the account hierarchy (partnership, parent accounts, child accounts).
SELECT count(*) FROM NrDailyUsage FACET partnershipName,masterAccountName,masterAccountId,consumingAccountName,consumingAccountId LIMIT 2000 SINCE 1 day ago
This query produces a close approximation of the CSV report you would have seen in the deprecated UI system:
FROM NrDailyUsage SELECT consumingAccountId AS 'Account ID', hostId, cloudProvider AS 'Host provider', cloudInstanceType AS 'Instance type', apmBillingInstanceSize AS 'Instance size', apmHoursUsed AS 'Hours used', apmComputeUnits AS 'Usage (CU)', apmMemoryBytes/(1024*1024*1024) AS 'Total RAM', apmProcessorCount AS 'Logical processors', apmContainerCount AS 'Container count', apmComputeUnitRule AS 'Business rule', missingCpuData, missingRamData, instanceSizeCapped, cloudZone, cloudInstanceId WHERE productLine='APM' AND usageType='Host' SINCE 1 day ago LIMIT 2000
This NRQL query is different than the legacy usage report:
Per-host query | Comments |
---|---|
Time period | This query includes only the last 24 hours of usage. To see the usage aggregated over a longer time period, change the |
Results limited to a maximum number of rows | NRQL limits the number of rows returned. If you have more hosts than the maximum number of rows returned and want to get the complete set of hosts, you can narrow your query with more |
Docker container IDs | A single Docker container ID does not appear in this report. A Docker container ID is reported only at the application instance level of granularity ( For the host ( |
Business rule |
|
This query returns data once provided in the "host usage report": a listing of applications running on each host. Note that while APM usage is counted on an hour-by-hour basis, per-hour usage data is no longer available via the API or UI.
FROM NrDailyUsage SELECT min(timestamp) AS 'Earliest reporting day',max(timestamp) AS 'Latest reporting day' FACET apmAppName,hostId,agentHostname,consumingAccountName,consumingAccountId WHERE usageType='Application' AND productLine='APM' SINCE 1 month ago LIMIT 2000
Use of Docker and other containers
Some previous New Relic APM agents may miscount containers as hosts, which may lead to over-reporting of host-based usage.
To fix this calculation for Linux-based containers (including Docker), upgrade your APM agent to these versions:
- Go: 1.11 or higher
- Java: 3.42.0 or higher
- .NET: 6.19.330.0 or higher
- Node.js: 2.1.0 or higher
- PHP: 7.5.0.199 or higher
- Python: 2.90.0.75 or higher
- Ruby: 4.4.0.336 or higher
For accounts on our original pricing model, this explains how we calculate billable usage for Browser subscription usage. This document also provides available subscription usage attributes and example NRQL queries to use in the New Relic UI or with API calls.
For details about single-page app (SPA) monitoring usage, see SPA usage.
Data generation
Once per hour, for every monitored application, a New Relic Browser account will generate a NrUsage
event. Each event will summarize the usage for the last hour.
When querying Browser usage data, use a productLine
attribute value of Browser
. For more information, see the Browser query examples.
Usage calculations
Monthly subscription usage equals the total number of page views that month across all end-user browsers. AJAX traffic does not count against your daily usage. If your page views are fairly steady over time, you can estimate usage for the current month.
Tip
Only the account Owner and Admins can view the usage UI. However, anyone in your account can query usage data using the NrUsage
event.
To view usage information in the UI:
- Go to: account dropdown > View your usage.
- On the Browser usage page, set the time picker to Last 30 days.
- Multiply the Avg daily page views by the number of days in the current month.
For more information about the usage UI, see Introduction to New Relic subscription usage data.
Table definitions
Here are definitions of the column headers displayed in the UI table and CSV files. The columns visible depend on the Group by option selected at the top of the page.
Header | Definition |
---|---|
Account name | The name of the account. This can be a standalone account, a parent account, or a customer partnership. |
Account ID | New Relic account ID. |
Average daily page views | The average daily page views for that account or application. |
% of total usage | The percentage of the total usage used. |
Query examples
Here are some examples of NRQL queries you can use with your subscription usage data. You can run NRQL queries and use the resulting charts in dashboards.
This query shows a count of page views from the last complete month:
SELECT sum(usage) FROM NrUsage WHERE productLine='Browser' SINCE last month UNTIL this month
This query shows a count of page views from the last week by account:
SELECT sum(usage) FROM NrUsage WHERE productLine='Browser' SINCE 7 days ago FACET consumingAccountName
This query shows a count of page views from the past month by application
SELECT sum(usage) FROM NrUsage WHERE productLine='Browser' SINCE 30 days ago FACET browserAppID
This query is useful for seeing the account hierarchy (partnership, parent accounts, child accounts):
SELECT count(*) FROM NrUsage FACET partnershipName,masterAccountName,masterAccountId,consumingAccountName,consumingAccountId LIMIT 1000 SINCE 1 day ago
SPA usage
Page views are used by New Relic Browser to determine customer data usage and product pricing. This document defines a page view in the context of New Relic Browser's SPA monitoring and explains why:
- SPA monitoring does not affect Browser data usage
- SPA monitoring will increase Insights data usage
In New Relic Browser, a page view is defined as a complete load or reload of a page, signaled by the firing of the window.onload
event.
New Relic's SPA monitoring tracks traditional page views, but it also tracks changes in the browser that do not require a page load, such as:
- Route and hash changes
- Synchronous and asynchronous JavaScript
- Dynamic server-side updates to a page
Route changes are tracked automatically, and by setting up custom instrumentation you can capture almost any type of browser interaction.
With New Relic Browser Pro, pricing is based on an account's number of page views per month. If SPA monitoring is enabled, browser interactions that do not require a page load are not counted as page views for billing purposes. With SPA monitoring, you can track an unlimited number of route changes and other custom browser interactions that don't involve page loads.
Notes on Insights subscription
If you switch from standard Browser monitoring to SPA monitoring, and you also pay for Insights (and don't use only your complementary Insights subscription), your Insights data usage will increase. Because SPA monitoring is a more advanced way to monitor your application, it creates more Insights events than standard monitoring for the following reasons:
- Page views create not only
PageView
events, but alsoBrowserInteraction
,AjaxRequest
, andBrowserTiming
events. - For the typical SPA-architecture app, there are more route changes than there are standard page loads.
If you pay for Insights and your current Insights license is not sufficient for the amount of events generated with SPA monitoring, we will notify you when you have exceeded your data usage plan. To remedy this, the following options are available:
- Upgrade your Insights plan.
- Turn off the reporting of some event types.
- Use the Browser API to manually turn off collection of some events
- Switch from Browser SPA monitoring back to standard monitoring
For accounts on our original pricing model, this explains how we calculate billable usage for Mobile accounts. This document also provides available subscription usage attributes and example NRQL queries to use in the New Relic UI or with API calls.
Data generation
Once per day, for every monitored application, a New Relic Mobile account will generate an NrDailyUsage
event. Each event summarizes the Mobile usage for the current calendar month, up to and including the last 24 hours.
To query Mobile usage data, use a productLine
attribute value of Mobile
. For more information, see the Mobile query examples.
Usage calculations
New Relic Mobile subscription usage is based on the concept of monthly active users (MAUs).
- For a mobile app monitored by New Relic, MAUs will represent a cumulative count of unique users that used that app during a calendar month. Each unique end-user mobile device counts as a "user" for the purposes of this metric.
- For accounts that have multiple apps, total account usage will represent a sum of the MAUs for all the apps under that account.
Tip
Only the account Owner and Admins can view the usage UI. However, anyone in your account can query usage data using the NrDailyUsage
event.
To get an estimate of the current month's billable usage:
- Go to the usage UI.
- On the Mobile usage page, set the time picker to Current month.
The Mobile usage chart and table display the maximum MAUs that have been reached over a given time period. It will usually ramp up quickly at the beginning of the month, then grow slowly throughout the month. Because it represents the maximum value found so far, it will never go down. This makes Mobile usage different from other New Relic usage measurements, which are based on summing daily usage.
For more information about the usage UI, see Introduction to New Relic subscription usage data.
Table definitions
Here are definitions of the column headers displayed in the UI table and CSV files. The columns visible depend on the Group by option selected at the top of the page.
Header | Definition |
---|---|
Account name | The name of the account. This can be a standalone account, a parent account, or a customer partnership. |
Application name | The name of the mobile application. |
Application ID | New Relic Mobile application ID. |
Maximum MAUs | Maximum monthly active users. For the current calendar month, the highest count of active users that has been reached. This number can be compared to the MAUs included in your New Relic subscription. |
% of total usage | The percentage of the total usage that is attributed to the group (account or application, depending on the Group by selection). |
Query examples
Here are some examples of NRQL queries you can use with your subscription usage data. You can run NRQL queries, and use the resulting charts in dashboards.
A chart of monthly active users for the last complete month:
SELECT sum(mobileUniqueUsersPerMonth) FROM NrDailyUsage WHERE usageType='Application' AND productLine='Mobile' SINCE last month UNTIL this month TIMESERIES 1 day
The billable MAU number for the month is the maximum number on this chart. You can also get the billable number for a given month directly with this query, using the last day of the month in the since
clause, for example:
SELECT sum(mobileUniqueUsersPerMonth)
FROM NrDailyUsage
SINCE '2018-05-31' UNTIL '2018-06-01'
A count of monthly active users from the last complete month, faceted by application name:
SELECT max(mobileUniqueUsersPerMonth) FROM NrDailyUsage WHERE usageType='Application' AND productLine='Mobile' SINCE last month UNTIL this month FACET mobileAppName
The sum of these numbers will be the account's billable MAUs for the last complete month.
This query shows a count of unique mobile applications over the past month:
SELECT uniqueCount(mobileAppName) FROM NrDailyUsage WHERE usageType='Application' AND productLine='Mobile' SINCE 1 month ago
This query is useful for seeing the account hierarchy (partnership, parent accounts, child accounts):
SELECT count(*) FROM NrDailyUsage FACET partnershipName,masterAccountName,masterAccountId,consumingAccountName,consumingAccountId LIMIT 1000 SINCE 1 day ago
For accounts on our original pricing model, this explains how we calculate billable usage for Infrastructure accounts. This document also provides available subscription usage attributes and example NRQL queries to use in the New Relic UI or with API calls.
Data generation
Once per day, a New Relic Infrastructure account will generate an NrDailyUsage
event for every unique host on which an application instance existed over the last 24 hours. All Infrastructure events have a productLine
attribute value of Infrastructure
. For more information, see query examples.
Usage calculation
Monthly billable CUs for a host are calculated by the size of the host running Infrastructure (number of CPUs + GBs of RAM) multiplied by the number of hours the host is connected to New Relic during that month. For more on how this is calculated, see CU-based pricing.
If your usage is fairly steady over time, you can estimate usage for the current month.
Tip
Only the account Owner and Admins can view the usage UI. However, anyone in your account can query usage data using the NrDailyUsage
event.
To view usage information in the UI:
- Go to the usage UI.
- On the Infrastructure usage page, set the time picker to Last 30 days.
- Multiply the Avg daily compute units by the number of days in the current month.
For more information about the usage UI, see Introduction to subscription usage data.
Table definitions
Here are definitions of the column headers displayed in the UI table and CSV files. The columns displayed depend on the Group by option selected at the top of the page.
Header | Definition |
---|---|
Account name | The name of the account. This can be a standalone account, a parent account or a customer partnership. |
Account ID | New Relic account ID. |
Agent hostname | The name of the host, as reported by the agent. For more about this value, see |
Average daily compute units | The average daily compute units used. |
% of total usage | The percentage of the total usage used. |
Query examples
Here are some examples of NRQL queries you can use with your Infrastructure subscription usage data. You can run NRQL queries, and use the resulting charts in dashboards.
For general information about how to use NRQL queries to get focused usage data, see Intro to usage data.
This query produces a count of the CUs used over the last month:
SELECT sum(infrastructureComputeUnits) FROM NrDailyUsage WHERE productLine='Infrastructure' AND usageType='Host' SINCE last month UNTIL this month
This query reproduces as closely as possible the report you would have gotten by downloading the CSV from the previously available Infrastructure subscription usage UI:
FROM NrDailyUsage SELECT consumingAccountId AS 'Account ID',agentHostname,cloudProvider AS 'Host provider', cloudInstanceType AS 'Instance type',infrastructureBillingInstanceSize AS 'Instance size',infrastructureHoursUsed AS 'Hours used',infrastructureComputeUnits AS 'Usage (CU)', infrastructureCloudDerivedMemoryBytes/(1024*1024*1024) AS 'Total RAM',infrastructureCloudDerivedProcessorCount AS 'Logical processors',infrastructureAgentMemoryBytes/(1024*1024*1024) AS 'Total RAM',infrastructureAgentProcessorCount AS 'Logical processors',infrastructureComputeUnitRule AS 'Business rule',missingCpuData, missingRamData, instanceSizeCapped,cloudZone,cloudInstanceId WHERE productLine='Infrastructure' AND usageType='Host' SINCE 1 day ago LIMIT 1000
This NRQL query is different than the legacy usage report:
Detailed host query | Comments |
---|---|
Time period | This query includes only the last day of usage. To see the usage aggregated over a longer time period, change the SINCE clause. |
Results limited to 1000 | NRQL limits the results to 1000. If you have more than 1000 hosts and want to get the complete set of hosts, you can narrow your query with more |
Business rule |
|
This query is useful for seeing the account hierarchy (partnership, parent accounts, child accounts).
SELECT count(*) FROM NrDailyUsage FACET partnershipName,masterAccountName,masterAccountId,consumingAccountName,consumingAccountId LIMIT 1000 SINCE 1 day ago
For accounts on our original pricing model, this 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.
Data generation
Once per day, an account with an Insights Pro subscription will generate an NrDailyUsage
event for every event namespace. A NrDailyUsage
event includes a count of the events under that namespace.
To view the attributes for this event, see the NrDailyUsage
entry in the data dictionary.
Usage calculations
Tip
Only the account Owner and Admins can view the usage UI. However, anyone in your account can query usage data using the NrDailyUsage
event.
To get an estimate of the current month's billable usage:
- Go to the usage UI.
- On the Insights usage page, set the time picker to Current month.
For more information about the usage UI, see Introduction to 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.
How long specific events are retained will depend on each event type's data retention period. For a list of the applicable event types, see Event namespaces.
Table definitions
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.
Header | Definition |
---|---|
Account name | The name of the account. This can be a standalone account, a parent account, or a partnership. |
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 |
---|---|---|
APM Transactions |
|
|
APM Errors |
|
|
Browser |
|
|
Page view timing |
|
|
SPA monitoring |
|
|
JS errors |
|
|
Custom:* |
| Event types stored using custom filters created by New Relic. Not applicable for most customers. |
Custom events |
| Custom event types that you create using New Relic agents or the Event API |
|
| |
Mobile crash |
|
|
Mobile error (for HTTP requests and HTTP errors features) |
|
|
Mobile exception |
|
|
Mobile general |
|
|
Mobile session |
|
|
Query examples
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.
Tip
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.
This query will tell you the "billable" number of Insights-governed events for all accounts (parent accounts and child 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
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
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 limit
clause to see all of the facets in this query.
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
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 Transaction
events), for each child account under the specified parent 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
This query will tell you how many events under an Insights Pro subscription are being consumed by each child account for the specified parent 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 parent 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
This query is useful for seeing the account hierarchy (partnership, parent accounts, child accounts).
SELECT count(*) FROM NrDailyUsage FACET partnershipName,masterAccountName,masterAccountId,consumingAccountName,consumingAccountId LIMIT 1000 SINCE 1 day ago
For accounts on our original pricing model, this explains how we calculate billable usage for Synthetics accounts. This document also provides available subscription usage attributes and example NRQL queries to use in the New Relic UI or with API calls.
Data generation
A New Relic Synthetics subscription level is based on the number of non-ping monitor checks used during a calendar month. Once per day, every Synthetics monitor location will generate an NrDailyUsage
event for every monitor type. This event will summarize Synthetics usage for that location and monitor type over the last 24 hours.
All Synthetics usage events have a productLine
attribute value of Synthetics
. For more information, see the Synthetics query examples.
Usage calculations
A New Relic Synthetics subscription level is based on the number of non-ping monitor checks used during a calendar month. If your monitor checks are fairly steady over time, you can estimate the current month's eventual usage.
Tip
Only the account Owner and Admins can view the usage UI. However, anyone in your account can query usage data using the NrDailyUsage
event.
To view usage information in the UI:
- Go to the usage UI.
- On the Synthetics usage page, set the time picker to Last 30 days.
- Multiply the Avg daily paid checks by the number of days in the current month.
The Synthetics usage chart displays the daily count of monitor checks. The table value Avg daily paid checks displays the total number of monitor checks for the selected time period, divided by the number of days.
For more information about the usage UI, see Introduction to subscription usage data.
Query examples
Here are some examples of NRQL queries you can use with your Synthetics subscription usage data. You can run NRQL queries, and use the resulting charts in dashboards.
This query produces a chart of the billable monitor checks over the last month. Remember that a syntheticsType
of SIMPLE
refers to a ping monitor, which doesn't count towards paid usage.
FROM NrDailyUsage SELECT sum(syntheticsFailedCheckCount) + sum(syntheticsSuccessCheckCount) AS 'Paid checks' where productLine='Synthetics' AND syntheticsType != 'SIMPLE' SINCE last month UNTIL this month
This is a non-product-specific query useful for seeing your account hierarchy (partnership, parent accounts, child accounts).
SELECT count(*) FROM NrDailyUsage FACET partnershipName,masterAccountName,masterAccountId,consumingAccountName,consumingAccountId LIMIT 1000 SINCE 1 day ago