| title | Schedule NRQL searches | ||||||
|---|---|---|---|---|---|---|---|
| tags |
|
||||||
| metaDescription | Schedule automated NRQL queries to receive regular updates on your data via email. Transform repetitive, manual queries into proactive, automated workflows. | ||||||
| freshnessValidatedDate | never |
As a New Relic user, you may run the same NRQL queries over and over again to monitor critical patterns, check for specific conditions, or generate regular reports. For example, you need to check daily for failed transactions, monitor weekly error rates, or track hourly performance metrics across your applications. This manual process is time-consuming and makes it easy to miss important insights when you're not actively monitoring.
Scheduled NRQL searches solve this problem by automating your repetitive queries. You can schedule queries to run automatically and receive results via email, so you'll stay informed about critical patterns without constant manual monitoring.
We're still working on this feature, but we'd love for you to try it out!This feature is currently provided as part of a preview program pursuant to our pre-release policies. During the preview period, this feature is accessible through the Logs UI, with plans to expand to other capabilities after general availability.
Scheduled NRQL searches let you:
- Automate repetitive queries: Convert manual queries into automated workflows that run on your schedule.
- Stay informed proactively: Receive email notifications with query results delivered directly to your inbox.
- Flexible scheduling: Use custom cron expression schedules to define when queries run.
- Multiple output formats: Export results as CSV or JSON files attached to email notifications.
- Team collaboration: Send scheduled search results to multiple email recipients.
- Centralized management: View, edit, and manage all your scheduled searches from a single location in the Administration UI.
To use scheduled NRQL searches, you need:
- User permissions: Workflow Automation permissions are required to create and manage scheduled searches.
- Account access: Access to the account where you want to schedule searches.
- Data access: Appropriate permissions to query the data you want to schedule. For example, if scheduling a query against log data, you need access to that log data.
To schedule a new automated NRQL search:
**Access scheduled searches**:- Go to one.newrelic.com > Administration > Scheduled Searches.
- To configure a new search, from the Scheduled Searches page, click Schedule a search.
- On the configuration modal, draft your NRQL query using standard NRQL syntax.
- Test your query to ensure it returns the expected results.
- To set up notification settings for the scheduled search, click Continue.
-
Enter a name for your scheduled search.
-
Add an optional description to help identify the search purpose.
-
Set a destination to receive the query results. Currently, you can only send results to email destinations.
From the dropdown, check the existing destinations. Each destination may have a group of email addresses associated with it. Choose one or more destinations to receive the query results. If the destination you want isn't listed, you can create a new one.<Collapser id="new-destination" title="Add a new destination"
Click <DNT>**+ Add destination**</DNT> and perform the following steps on the opened modal: 1. Click <DNT>**+ Add email**</DNT>, search recipients by email ID or username, and add them. 2. Enter a unique name for the destination and save. The new destination is added to the list of available destinations in the notification setup modal. To edit the destination, select the <Icon name="fe-more-horizontal"/> menu. -
Enter a subject and message body for the email notification.
-
Select a query result format you want to include in the email.
-
To set a schedule for the email notifications, click Continue.
Currently it supports only cron expressions. Following are some common cron expression patterns for reference. Enter a cron expression and click Continue.
-
0 * * * *- Every hour at the top of the hour -
0 9 * * *- Every day at 9:00 AM -
0 9 * * 1- Every Monday at 9:00 AM -
0 0 1 * *- First day of every month at midnight -
*/15 * * * *- Every 15 minutes -
0 9 * * 1-5- Every weekday at 9:00 AM{/* 1. Choose a frequency for your search (e.g., hourly, daily, weekly, or cron expression). 2. Set the start time for your search with the time zone. 3. Define the Start time and End time for the search. 4. Choose one of the following conditions to send the notification: * On every run: Receive a notification every time the search runs. * On result count > 0: Receive a notification only when the search returns results. */}
The Scheduled searches page in the Administration UI displays all your automated searches with their name, description, schedule, status, and next run time. From you can:
- Edit a search to update the query, schedule, notification settings, or output format.
- Delete a search.
Now that you've set up scheduled NRQL searches:
- Learn more about NRQL queries to create more sophisticated automated searches.
- Configure alert email destinations to expand your notification options.
- Explore workflow automation for more advanced automation possibilities.
