The Data of New Relic Queries is based on statements that are written in New Relic Query Language (NRQL). Data can be returned from adhoc queries, or by queries saved to the dashboard.
Admin Events
Active Admin Users
Widget: Active Admin Users
Function: Returns the number of active admin users.
SELECT uniqueCount(AdminId)
FROM Transaction
WHERE appName='<your_app_name>’ SINCE 15 minutes ago
Currently Active Admins
Widget: Currently Active Admins
Function: Returns the names of active admin users.
SELECT uniques(AdminName)
FROM Transaction
WHERE appName='<your_app_name>’ SINCE 15 minutes ago
Recent Admin Activity
Widget: Recent Admin Activity
Function: Returns the number of recent admin actions.
SELECT count(AdminId)
FROM Transaction
WHERE appName ='<your_app_name>’ FACET AdminName SINCE 1 day ago
Latest Admin Activity
Widget: Latest Admin Activity
Function: Returns recent admin actions, including the admin username, duration, and application name.
SELECT AdminName, duration, name
FROM Transaction
WHERE appName='<your_app_name>’ AND AdminName IS NOT NULL
AND AdminName != ‘N/A’ LIMIT 50
Cron Events
Category Count
Widget: Category Count
Function: Returns the number of application events by category during the specified period.
SELECT average(CatalogCategoryCount)
FROM Cron
WHERE CatalogCategoryCount IS NOT NULL
AND appName = ‘<your_app_name>’ TIMESERIES 2 minutes
Current Catalog Count
Widget: Current Catalog Count
Function: Returns the average number of application events in the catalog by category during the specified period.
SELECT average(CatalogCategoryCount)
FROM Cron
WHERE CatalogCategoryCount IS NOT NULL
AND CatalogCategoryCount > 0
AND appName = ‘<your_app_name>’ SINCE 2 minutes ago LIMIT 1
Active Products
Widget: Active Products
Function: Returns the number of application events by product during the specified period.
SELECT average(CatalogProductActiveCount)
FROM Cron
WHERE CatalogProductActiveCount IS NOT NULL
AND appName = ‘<your_app_name>’ TIMESERIES 2 minutes
Active Product Count
Widget: Active Product Count
Function: Returns the average number of active application events by product during the specified period.
SELECT average(CatalogProductActiveCount)
FROM Cron
WHERE CatalogProductActiveCount IS NOT NULL
AND CatalogProductActiveCount > 0
AND appName = ‘<your_app_name>’ SINCE 2 minutes ago LIMIT 1
Configurable Products
Widget: Configurable Products
Function: Returns the average number of application events for configurable products during the specified period.
SELECT average(CatalogProductConfigurableCount)
FROM Cron
WHERE CatalogProductConfigurableCount IS NOT NULL
AND appName = ‘<your_app_name>’ TIMESERIES 2 minutes
Configurable Product Count
Widget: Configurable Product Count
Function: Returns the average number of application events by configurable product during the specified period.
SELECT average(CatalogProductConfigurableCount)
FROM Cron
WHERE CatalogProductConfigurableCount IS NOT NULL
AND CatalogProductConfigurableCount > 0
AND appName = ‘<your_app_name>’ SINCE 2 minutes ago LIMIT 1
Product Count (all)
Widget: Product Count (all)
Function: Returns the sum of application events for all products.
SELECT average(CatalogProductCount)
FROM Cron
WHERE CatalogProductCount IS NOT NULL
AND appName = ‘<your_app_name>’ TIMESERIES 2 minutes
Current Product Count (all)
Widget: Current Product Count (all)
Function: Returns the average number of application events for all products during the specified period.
SELECT average(CatalogProductCount)
FROM Cron
WHERE CatalogProductCount IS NOT NULL
AND CatalogProductCount > 0
AND appName = ‘<your_app_name>>’ SINCE 2 minutes ago LIMIT 1
Customer Count
Widget: Customer Count
Function: Returns the average number of application events by customer.
SELECT average(CustomerCount)
FROM Cron
WHERE CustomerCount IS NOT NULL
AND CustomerCount > 0
AND appName = ‘<your_app_name>’ TIMESERIES 2 minutes
Currrent Customer Count
Widget: Current Customer Count
Function: Returns the average number of customers during the specified period.
SELECT average(CustomerCount)
FROM Cron
WHERE CustomerCount IS NOT NULL
AND CustomerCount > 0
AND appName = ‘<your_app_name>’ SINCE 2 minutes ago LIMIT 1
Module Status
Widget: Module Status
Function: Returns the average number of times application modules are activated, deactivated, or installed during the specified period.
SELECT average(ModulesDisabled), average(ModulesEnabled), average
(ModulesInstalled)
FROM Cron
WHERE appName = ‘<your_app_name>’ TIMESERIES 2 minutes
Current Module Status
Widget: Current Module Status
Function: Returns the average number of times modules were activated, deactivated, or installed during the specified period.
SELECT average(ModulesDisabled), average(ModulesEnabled), average
(ModulesInstalled)
FROM Cron
WHERE appName = ‘<your_app_name>’ SINCE 2 minutes ago LIMIT 1
Website and Store Counts
Widget: Website and Store Counts
Function: Returns the average number of application events by website and store during the specified period.
SELECT average(StoreViewCount), average(WebsiteCount)
FROM Cron
WHERE appName = ‘<your_app_name>’ TIMESERIES 2 minutes
Current Website and Store Counts
Widget: Current Website and Store Counts
Function: Returns the average number of current application events during the specified period.
SELECT average(StoreViewCount), average(WebsiteCount)
FROM Cron
WHERE appName = ‘<your_app_name>’ SINCE 2 minutes ago LIMIT 1
Cron – All Data from Event
Widget: Cron – All Data from Event
Function: Returns all application event data.
SELECT *
FROM Cron
WHERE appName = ‘<your_app_name>’
Customers
Active Customer Count
Widget: Active Customer Count
Function: Returns the number of active customers during the specified period.
SELECT uniqueCount(CustomerId)
FROM Transaction
WHERE appName = ‘<your_app_name>’ SINCE 15 minutes ago
Active Customers
Widget: Active Customers
Function: Returns the names of active customers during the specified period.
SELECT uniques(CustomerName)
FROM Transaction
WHERE appName='<your_app_name>’ SINCE 15 minutes ago
Top Customers
Widget: Top Customers
Function: Returns the top customers during the specified period.
SELECT count(CustomerId)
FROM Transaction
WHERE appName = ‘<your_app_name>’ FACET CustomerName SINCE 1 day ago
Recent Admin Activity
Widget: Recent Admin Activity
Function: Returns a defined number of records of recent activity, that include the customer name and duration of the visit.
SELECT CustomerName, duration, name
FROM Transaction
WHERE appName='<your_app_name>’
AND CustomerName IS NOT NULL
AND CustomerName != ‘N/A’ LIMIT 50
Orders
Number of Orders Placed
Widget: Number of Orders Placed
Function: Returns the number of orders placed during the specified period.
SELECT count(`Order`)
FROM Transaction SINCE 1 day ago
Total Order Value
Widget: Total Order Value
Function: Returns the sum of line items ordered during the specified period.
SELECT sum(LineItemCount)
FROM Transaction SINCE 1 day ago
Total Line Items Ordered
Widget: Total Line Items Ordered
Function: Returns the sum of line items ordered during the specified period.
SELECT sum(LineItemCount)
FROM Transaction SINCE 1 day ago