-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[Feat](scheduled search)[Do not merge till 29th Oct]: Documentation for scheduled log searches feature #21733
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
sujitnewrelic
wants to merge
10
commits into
develop
Choose a base branch
from
NR-459575-log-query-scheduling
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
7822ea7
Add comprehensive documentation for scheduled log searches feature
sujitnewrelic 1aea768
Fix missing periods in bullet points and descriptions
sujitnewrelic 6f74b97
Update scheduled searches documentation with proper syntax components
sujitnewrelic e5ad626
Remove guessed content and improve document structure
sujitnewrelic 93e8b3d
Updated the draft as per the SME feedback.
sujitnewrelic f50a492
formating correction
sujitnewrelic beaa927
syntax fix
sujitnewrelic 8676980
Update use-logs-ui.mdx
sujitnewrelic e1d0892
Language correction, and removed the capabilities those are not devel…
sujitnewrelic 707a45a
corrections
sujitnewrelic File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,10 +1,10 @@ | ||||||
--- | ||||||
title: Use logs UI | ||||||
title: "Use logs UI" | ||||||
tags: | ||||||
- Logs | ||||||
- Log management | ||||||
- UI and data | ||||||
metaDescription: How to use the New Relic logs UI to explore your data. | ||||||
metaDescription: "How to use the New Relic logs UI to explore your data." | ||||||
redirects: | ||||||
- /docs/explore-your-data-new-relic-logs-ui | ||||||
- /docs/logs/new-relic-logs/ui-data/explore-your-data-new-relic-logs-ui | ||||||
|
@@ -25,6 +25,7 @@ Use our logs UI to: | |||||
* Query your data to create custom visualizations, or add those to dashboards | ||||||
* Organize your organization's log data, and optimize query performance with data partitions. | ||||||
* Set up alert conditions for problems you want to prevent. | ||||||
* [Schedule automated NRQL searches](#workflow-search) to receive regular query results via email. | ||||||
|
||||||
To stay up to date with new capabilities and improvements, subscribe to our [RSS feed for Logs release notes](/docs/release-notes/logs-release-notes). | ||||||
|
||||||
|
@@ -126,11 +127,29 @@ To explore your logging data, follow this basic workflow. | |||||
To switch from the Lucene-syntax search bar to a NRQL query, click the <DNT>**NRQL**</DNT> button beside the search bar. There is no direct equivalence between NRQL and Lucene, and this means that the NRQL query will often be simpler and not as complex, but this gives you a helpful start for building a query with the same data. | ||||||
|
||||||
For more information on querying your logs, see the [logs query syntax docs](/docs/logs/ui-data/query-syntax-logs/). | ||||||
|
||||||
**Schedule a search** | ||||||
|
||||||
<Callout title="preview"> | ||||||
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](/docs/licenses/license-information/referenced-policies/new-relic-pre-release-policy). | ||||||
</Callout> | ||||||
|
||||||
After composing and running a query in the logs UI, you can schedule it to run automatically and receive results via email: | ||||||
|
||||||
1. From the <DNT>**All logs**</DNT> page, compose and run your query. | ||||||
2. To schedule the search, use either of these options: | ||||||
* Click <Icon name="fe-more-horizontal"/> at the top-right corner and select <DNT>**Schedule search**</DNT>. | ||||||
* Click the clock icon below the query trend chart. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
3. Configure your [scheduled NRQL search](/docs/nrql/using-nrql/schedule-nrql-searches) with notification settings, schedule, and output format. | ||||||
|
||||||
To view and manage all your scheduled searches, go to <DNT>**[one.newrelic.com](https://one.newrelic.com) > Administration > Scheduled searches**</DNT>. Learn more about [managing scheduled searches](/docs/nrql/using-nrql/schedule-nrql-searches/#manage). | ||||||
</Collapser> | ||||||
|
||||||
<Collapser | ||||||
id="query-builder" | ||||||
title="7. Advanced log analysis with NRDB query builder." | ||||||
title="6. Advanced log analysis with NRDB query builder." | ||||||
> | ||||||
<img | ||||||
title="Advanced log analysis with NRDB query builder" | ||||||
|
@@ -143,7 +162,7 @@ To explore your logging data, follow this basic workflow. | |||||
|
||||||
<Collapser | ||||||
id="workflow-related" | ||||||
title="8. Get related logs." | ||||||
title="7. Get related logs." | ||||||
> | ||||||
Focusing on the most useful logs can help you with: | ||||||
|
||||||
|
@@ -156,7 +175,7 @@ To explore your logging data, follow this basic workflow. | |||||
|
||||||
<Collapser | ||||||
id="traces-in-context-overview" | ||||||
title="9. Dive deep into distributed traces." | ||||||
title="8. Dive deep into distributed traces." | ||||||
> | ||||||
Once you've narrowed down the set of logs with filters and then opened a specific log, you can see related distributed traces. As long as you've set up distributed tracing and there are sampled traces related to logs, you'll see an option to view them. This is a quick way to view trace information without going to the main distributed tracing page. | ||||||
|
||||||
|
@@ -179,10 +198,11 @@ To explore your logging data, follow this basic workflow. | |||||
|
||||||
<Collapser | ||||||
id="share" | ||||||
title="10. Share your findings." | ||||||
title="9. Share your findings." | ||||||
> | ||||||
Use any of the core New Relic UI functions to [explore your data](/docs/query-your-data/explore-query-data/browse-data/introduction-data-explorer/) (specific account, time range, metrics and events, query builder, etc.) and share the data with charts, add to dashboards, etc. For more information, see the [examples](#examples) in this document. | ||||||
</Collapser> | ||||||
|
||||||
</CollapserGroup> | ||||||
|
||||||
## Export [#export] | ||||||
|
139 changes: 139 additions & 0 deletions
139
src/content/docs/nrql/using-nrql/schedule-nrql-searches.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
--- | ||
title: Schedule NRQL searches | ||
tags: | ||
- NRQL | ||
- Scheduled searches | ||
- Query scheduling | ||
- Automated queries | ||
- Email notifications | ||
- Workflow automation | ||
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. | ||
|
||
<Callout title="preview"> | ||
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](/docs/licenses/license-information/referenced-policies/new-relic-pre-release-policy). During the preview period, this feature is accessible through the [Logs UI](/docs/logs/ui-data/use-logs-ui), with plans to expand to other capabilities after general availability. | ||
</Callout> | ||
|
||
## What you can do [#features] | ||
|
||
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. | ||
|
||
## Prerequisites [#prerequisites] | ||
|
||
To use scheduled NRQL searches, you need: | ||
|
||
* **User permissions**: [Workflow Automation](/docs/alerts-applied-intelligence/applied-intelligence/incident-workflows/incident-workflows/#requirements) 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. | ||
|
||
<Callout variant="important"> | ||
Scheduled NRQL searches are built on New Relic's Workflow Automation infrastructure. Your organization needs appropriate permissions to create and manage workflows. | ||
</Callout> | ||
|
||
## Schedule a new search [#create-schedule] | ||
|
||
To schedule a new automated NRQL search: | ||
|
||
<Steps> | ||
<Step> | ||
**Access scheduled searches**: | ||
|
||
1. Go to **[one.newrelic.com](https://one.newrelic.com) > Administration > Scheduled Searches**. | ||
2. To configure a new search, from the <DNT>**Scheduled Searches**</DNT> page, click **Schedule a search**. | ||
</Step> | ||
<Step> | ||
**Configure your query**: | ||
|
||
1. On the configuration modal, draft your NRQL query using standard NRQL syntax. | ||
2. Test your query to ensure it returns the expected results. | ||
3. To set up notification settings for the scheduled search, click **Continue**. | ||
|
||
</Step> | ||
<Step> | ||
**Set up notification**: | ||
|
||
1. Enter a name for your scheduled search. | ||
2. Add an optional description to help identify the search purpose. | ||
3. Set a [destination](/docs/alerts/get-notified/destinations/) to receive the query results. Currently, you can only send results to email destinations. | ||
|
||
<CollapserGroup> | ||
<Collapser | ||
id="existing destination-destination" | ||
title="Select an existing destination" | ||
> | ||
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> | ||
|
||
<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. | ||
</Collapser> | ||
</CollapserGroup> | ||
|
||
4. Enter a subject and message body for the email notification. | ||
5. Select a query result format you want to include in the email. | ||
6. To set a schedule for the email notifications, click **Continue**. | ||
|
||
</Step> | ||
<Step> | ||
**Set a schedule**: | ||
|
||
Currently it supports only Cron expressions. Following are some common cron expression patterns for reference. Enter a cron expression and click <DNT>**Continue**</DNT>. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Across the document i see that the capitalization for cron is not standard. Check and fix. |
||
|
||
* `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](#cron-examples)). | ||
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: | ||
* <DNT>**On every run**</DNT>: Receive a notification every time the search runs. | ||
* <DNT>**On result count > 0**</DNT>: Receive a notification only when the search returns results. */} | ||
</Step> | ||
<Step> | ||
**Review, confirm, and schedule the search**: | ||
Review your configuration. If you need to make further adjustments, switch back to the relevant step. After finalizing your configuration, click <DNT>**Schedule**</DNT> to create your automated search. The <DNT>**Scheduled searches**</DNT> page will display your new search in the list. | ||
</Step> | ||
</Steps> | ||
|
||
## Manage scheduled searches [#manage] | ||
|
||
The <DNT>**Scheduled searches**</DNT> page in the Administration UI displays all your automated searches with their name, description, schedule, status, and next run time. From <Icon name="fe-more-horizontal"/> you can: | ||
|
||
* **Edit a search** to update the query, schedule, notification settings, or output format. | ||
* **Delete a search**. | ||
* **Duplicate a search** and update it to create a new search. | ||
|
||
|
||
## What's next? [#whats-next] | ||
|
||
Now that you've set up scheduled NRQL searches: | ||
|
||
* [Learn more about NRQL queries](/docs/nrql/get-started/introduction-nrql-new-relics-query-language) to create more sophisticated automated searches. | ||
* [Configure alert email destinations](/docs/alerts-applied-intelligence/notifications/destinations) to expand your notification options. | ||
* [Explore workflow automation](/docs/alerts-applied-intelligence/applied-intelligence/incident-workflows/incident-workflows) for more advanced automation possibilities. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.