Note that if you're on our original user model, your account hierarchy may affect your queried data. For more information, see Account structure.
Data ingest usage queries
The usage UI displays your data ingest over time. If you need more detail than the UI provides, here are some example NRQL queries:
This query totals your billable ingested data, and displays a daily value for the past three months:
FROM NrConsumption SELECT sum(GigabytesIngested)
WHERE productLine = 'DataPlatform'
SINCE 3 months ago TIMESERIES 1 day
This query totals your billable ingested data, and displays a daily value for the past three months faceted by the source:
FROM NrConsumption SELECT sum(GigabytesIngested)
WHERE productLine = 'DataPlatform' SINCE 3 months ago
FACET usageMetric TIMESERIES 1 day
This query breaks down Metric data by the top ten metric names. You could also facet by appName or host to adjust the analysis.
FROM Metric SELECT bytecountestimate()/10e8 as 'GB Estimate'
SINCE '2021-04-01' UNTIL '2021-04-08'
FACET metricName LIMIT 10 TIMESERIES 1 day
This query shows the current full platform ingested data. In other words, it shows how much you'd be billed for your data for that month if you were billed right now.
FROM NrMTDConsumption SELECT latest(GigabytesIngested)
WHERE productLine = 'DataPlatform' SINCE this month
This query shows the estimated cost of your ingested data:
FROM NrMTDConsumption SELECT latest(estimatedCost)
WHERE productLine = 'DataPlatform' SINCE this month
User count queries
For a display of your user count, see the usage UI. If you need more detail than that, you can use the example NRQL queries below. For details about how users are calculated, see User calculations.
Here are example queries for these two pricing versions:
Important
This section applies for organizations on our primary version of New Relic One pricing, which has three user types: basic users, core users, and full platform users.
Here are some rules for querying your users:
Use only the NrMTDConsumption event.
The attributes used to query by user type are: BasicUsersBillable, CoreUsersBillable, and FullPlatformUsersBillable.
Here are some example NRQL queries for determining user count:
Month-to-date full platform users
This query shows the billable full platform users for the month. In other words, it shows how much you'd be billed for your full platform users for that month if you were billed right now.
FROM NrMTDConsumption SELECT latest(FullPlatformUsersBillable) SINCE this month
Month-to-date core users
This query shows the number of core users you’d be billed for if you were billed right now:
FROM NrMTDConsumption SELECT latest(CoreUsersBillable) SINCE this month
Track users during the switch to core users pricing version
If your organization started out with New Relic One pricing without core users and opted in to switch to the core users release, the usage UI will track the count of your billable users over that transition. Here's an example of a query that would display the count of full platform users over that transition period:
FROM NrMTDConsumption SELECT latest(billableConsumption) as 'Full platform users' where metric in ('FullPlatformUsers', 'FullUsers') SINCE 4 month ago limit max TIMESERIES
You can use the NrMTDConsumption or NrConsumption event.
The attributes used to query by user type are: BasicUsersBillable, and FullUsersBillable.
Billable full platform users for the month
This query shows the billable full platform users for the month. In other words, it shows how much you'd be billed for your users for the current month if you were charged at that moment.
FROM NrMTDConsumption SELECT latest(FullUsersBillable)
SINCE this month
This query shows how many full platform users were counted by hour. This is useful for seeing how the full platform user count changed over time.
from NrConsumption SELECT max(FullUsers)
SINCE 10 days ago TIMESERIES 1 hour
Projected monthly full platform user count
This query shows a projected count of monthly full platform users. This query would not be good for using in a dashboard; it requires values based on a) the days remaining in the month, b) the start of the month. Here's an example querying the projected end-of-month count with 10 days left in that month:
FROM NrMTDConsumption SELECT predictLinear(FullUsers, 10 days)
SINCE '2020-09-01'
Count of full platform users and basic users
The usage UI shows the count of full platform users and basic users. The query used is:
FROM NrUsage SELECT max(usage) SINCE 10 days ago
WHERE productLine='FullStackObservability'
WHERE metric in ('FullUsers', 'BasicUsers')
FACET metric
To see the count of full platform users and basic users over time:
FROM NrUsage SELECT max(usage) SINCE 10 days ago
WHERE productLine='FullStackObservability'
WHERE metric in ('FullUsers', 'BasicUsers') FACET metric TIMESERIES 1 hour
Set usage alerts
To help manage your billing, you can set alerts to notify you of unexpected increases in data ingest or user count.
Before building usage-related alert conditions, here are some tips:
Usage data is attached to the following events. For more detail on which event to use for querying users, see Query users.
NrUsage records usage every hour and is used to see the types of data being reported (for example, APM data or browser monitoring data).
NrConsumption records usage every hour, and is the equivalent of "real-time" usage. Use this event to observe usage trends over time.
NrMTDConsumption generates aggregate values from the NrConsumption event. Use this event to see usage or estimated cost by monthly billing period. For organizations on the core users release, this is the best event for querying user count.
Data ingest attributes
Below are some of the most important attributes attached to usage events.
Attribute
Description
productLine
The category of usage. There are three options: DataPlatform, FullStackObservability, and ProactiveDetection. (Starting November 1, 2021, IncidentIntelligence is no longer a billing factor.) For more details about these categories, see New Relic platform.
metric
This consolidates multiple categories of usage into a single metric. Helpful when faceting by productLine. It's an enum with possible values of BasicUsers, FullUsers, and GigabytesIngested. Values for the core user release include FullPlatformUsers and CoreUsers.
consumingAccountId
ID of the New Relic account directly responsible for the stored events, as determined from the license key used.
estimatedCost
Calculates a cost estimate based on usage and metric cost. This is an estimate of costs to date, not your monthly invoice.