Synthetics subscription usage attributes and queries

This document contains the attributes available for New Relic Synthetics subscription usage, and provides example NRQL queries for use in Insights or 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 a NrDailyUsage Insights 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 examples of NRQL queries, see query examples.

General attributes

The following are general (not Synthetics-specific) account-related attributes. These attributes can help you understand how your accounts and sub-accounts are using New Relic products.

Attribute Description
consumingAccountId

ID of the New Relic account that is directly responsible for the stored events, as determined from the license key used.

consumingAccountName Name of the New Relic account that is directly responsible for the stored events, as determined from the license key used.
masterAccountId

The ID of the master account that is either responsible for stored events or that is the parent of the consuming account. When a master account is the consuming account, masterAccountId is the consumingAccountId.

This attribute is present even for accounts that do not have a master account. This is to ensure continued reporting if the account is later made a master account.

masterAccountName

Name of the master account that is either responsible for stored events, or that is the parent of the consuming account. When a master account is the consuming account, masterAccountName is the consumingAccountName.

This attribute is present even for accounts that do not have a master account. This is to ensure continued reporting if the account is later made a master account.

partnershipId

Partner ID of the New Relic customer partnership associated with the account responsible for the stored events.

This attribute is only present if the consuming account is associated with a New Relic customer partnership.

partnershipName

Name of the New Relic customer partnership associated with the account responsible for the stored events.

This attribute is only present if the consuming account is associated with a customer partnership.

subAccountId

ID of the sub-account that is responsible for the stored event. When this attribute is present, subAccountId is the consumingAccountId.

This attribute is only present if the consuming account is a sub-account (not a master account).

subAccountName

Name of the sub-account responsible for stored events. When present, this attribute is the same as the consumingAccountName.

This attribute is only present if the consuming account is a sub-account (not a master account).

timestamp UNIX timestamp (seconds since epoch) of the day and time when event generation was initiated.

Synthetics attributes

The following are usage-related attributes generated by New Relic Synthetics. To query this data, use a productLine attribute value of Synthetics.

Attribute Description
productLine The New Relic product the usage data is from. Synthetics data will have the value Synthetics. Use this value when querying Synthetics usage data.
syntheticsFailedCheckCount Number of failed checks that ran on the given day for the given Synthetics monitor and location. Failed checks count toward subscription usage for Synthetics. Only checks with syntheticsType not equal to SIMPLE count toward billable subscription usage.
syntheticsSuccessCheckCount

Number of successful checks that ran on the given day for the given Synthetics monitor and location. Only checks with syntheticsType not equal to SIMPLE count toward billable subscription usage.

syntheticsLocation Location the check ran in.
syntheticsLocationLabel Human-readable label for the location of the check.
syntheticsType The type of Synthetics monitor. Possible values: SIMPLE, BROWSER, SCRIPT_BROWSER, SCRIPT_API. For more information, see Monitor types.
syntheticsTypeLabel Human-readable label for syntheticsType. Possible values: Ping, Simple Browser, Scripted Browser, Scripted API.
syntheticsMonitorName Name of the monitor.
syntheticsMonitorId Unique ID of the monitor.
usageType

The type of entity for which this event records usage data. This value is Check for Synthetics.

Query examples

Here are some examples of NRQL queries you can use with your Synthetics subscription usage data. You can run NRQL queries with the Insights query tool, use the resulting charts in Insights dashboards, and use the NRQL with the Insights query API.

Billable checks for the last month

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
Account hierarchy

This is a non-product-specific query useful for seeing your account hierarchy (partnership, master, sub-accounts).

SELECT count(*) 
FROM NrDailyUsage 
FACET partnershipName,masterAccountName,masterAccountId,consumingAccountName,consumingAccountId 
LIMIT 1000 
SINCE 1 day ago

For more help

Recommendations for learning more: