Skip to content
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

Add query structure example #6994

Open
wants to merge 61 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 44 commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
7599b89
Add query structure example
vagimeli Apr 23, 2024
c1fc3c8
Copyedits
vagimeli Apr 23, 2024
2998d20
Updates
vagimeli Apr 23, 2024
07ac98c
Writing and editing
vagimeli Apr 24, 2024
e07a229
Update dashboards-alerting.md
vagimeli Apr 24, 2024
1fb20ed
Writing and editing
vagimeli Apr 24, 2024
7a3ab13
Writing and editing
vagimeli Apr 25, 2024
f0805cc
Writing and editing
vagimeli Apr 25, 2024
699e246
Writing and editing
vagimeli Apr 25, 2024
ba57150
Merge branch 'main' into alert-query
vagimeli Apr 30, 2024
92427b3
Writing and edits
vagimeli May 9, 2024
d57736c
Writing
vagimeli May 13, 2024
6a13c15
Merge branch 'main' into alert-query
vagimeli May 16, 2024
f210148
Update _observing-your-data/alerting/dashboards-alerting.md
vagimeli May 16, 2024
1e4528a
Update dashboards-alerting.md
vagimeli May 16, 2024
527df8f
Update text
vagimeli May 16, 2024
0e41535
Update text
vagimeli May 16, 2024
b49cad7
Update text
vagimeli May 16, 2024
5bc9869
Update text
vagimeli May 16, 2024
37bc046
Update text
vagimeli May 16, 2024
4a79182
Merge branch 'main' into alert-query
vagimeli May 16, 2024
bcccdf1
Merge branch 'main' into alert-query
vagimeli May 16, 2024
4b053e9
Update text
vagimeli May 16, 2024
fc9321c
Merge branch 'main' into alert-query
vagimeli May 16, 2024
08fa092
Update text
vagimeli May 16, 2024
c27f9c2
Merge branch 'alert-query' of https://github.com/opensearch-project/d…
vagimeli May 16, 2024
5ff7c38
Update index.md
vagimeli May 28, 2024
fff652a
Update dashboards-alerting.md
vagimeli May 28, 2024
1be1f2b
Update tutorials
vagimeli May 28, 2024
f80b8d6
Update dashboards-alerting.md
vagimeli May 29, 2024
acd6615
Address tech review feedback
vagimeli May 29, 2024
2a7ff8e
Adjust image size
vagimeli May 30, 2024
62b68ba
Update dashboards-alerting.md
vagimeli Jun 5, 2024
b877e85
Merge branch 'main' into alert-query
vagimeli Jun 5, 2024
9323623
Merge branch 'main' into alert-query
vagimeli Jun 10, 2024
b00fb4f
Update _observing-your-data/alerting/dashboards-alerting.md
vagimeli Jun 10, 2024
30be2d0
Update _observing-your-data/alerting/index.md
vagimeli Jun 10, 2024
327d65c
Update _observing-your-data/alerting/dashboards-alerting.md
vagimeli Jun 10, 2024
dcd7d07
Update _observing-your-data/alerting/dashboards-alerting.md
vagimeli Jun 10, 2024
4eb590a
Update _observing-your-data/alerting/dashboards-alerting.md
vagimeli Jun 10, 2024
945aa1f
Update _observing-your-data/alerting/dashboards-alerting.md
vagimeli Jun 10, 2024
55a64ac
Update _observing-your-data/alerting/dashboards-alerting.md
vagimeli Jun 10, 2024
dbec55c
Update _observing-your-data/alerting/dashboards-alerting.md
vagimeli Jun 10, 2024
650400a
Update _observing-your-data/alerting/dashboards-alerting.md
vagimeli Jun 10, 2024
791aedf
Edit context menu image
vagimeli Jun 10, 2024
60c2e74
Edit context menu image
vagimeli Jun 10, 2024
d0c5724
Merge branch 'main' into alert-query
vagimeli Jun 28, 2024
076b88e
Merge branch 'main' into alert-query
vagimeli Jul 17, 2024
9ab7285
Merge branch 'main' into alert-query
vagimeli Aug 19, 2024
6a37a45
Update _observing-your-data/alerting/dashboards-alerting.md
vagimeli Aug 20, 2024
89996af
Update _observing-your-data/alerting/dashboards-alerting.md
vagimeli Aug 20, 2024
601dea4
Update dashboards-alerting.md
vagimeli Aug 20, 2024
0268abb
Merge branch 'main' into alert-query
vagimeli Aug 20, 2024
8e3efd5
Remove image per writing guidelines
vagimeli Aug 20, 2024
66bf288
Remove image per writing guidelines
vagimeli Aug 20, 2024
2f84646
Remove image per writing guidelines
vagimeli Aug 20, 2024
fec48e5
Merge branch 'main' into alert-query
vagimeli Aug 26, 2024
37531cd
Update _observing-your-data/alerting/dashboards-alerting.md
vagimeli Oct 2, 2024
d896314
Update _observing-your-data/alerting/dashboards-alerting.md
vagimeli Oct 2, 2024
0e7e597
Update _observing-your-data/alerting/dashboards-alerting.md
vagimeli Oct 2, 2024
0adb24b
Merge branch 'main' into alert-query
vagimeli Oct 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
322 changes: 273 additions & 49 deletions _observing-your-data/alerting/dashboards-alerting.md

Large diffs are not rendered by default.

62 changes: 41 additions & 21 deletions _observing-your-data/alerting/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ redirect_from:

# Alerting

To create an alert, do the following:
Alerting in OpenSearch enables proactive monitoring and timely response to potential issues or anomalies within your data and applications. Whether you're building and maintaining applications or ensuring the smooth operation of systems, alerting has a crucial role in maintaining system health and minimizing downtime.

- Configure a _monitor_, which is a job that runs on a defined schedule and queries OpenSearch indexes. Required.
- Configure one or more _triggers_, which define the conditions that generate events. Optional.
- Configure _actions_, which is what happens after an alert is triggered. Optional.
In OpenSearch, you can configure alerts by creating monitors that run on a defined schedule and query indexes. You define triggers that specify conditions for generating alert events, such as thresholds on a specific field. You can also configure actions for the alerts, such as sending notifications through email, Slack, or custom webhooks. OpenSearch Dashboards brings alerting and monitoring directly into the dashboard experience, allowing you to overlay alerts and anomalies visually on time-series charts for enhanced insights.

Here is an example configuration.

<img src="{{site.url}}{{site.baseurl}}/images/dashboards/alerting-config.png" alt="Alerting monitor configuration" width="500"/>

## Key terms

Expand All @@ -23,34 +25,52 @@ The following table lists alerting terminology commonly used in OpenSearch and t
Term | Definition
:--- | :---
Monitor | Job that runs on a defined schedule and queries OpenSearch indexes. The results of these queries are then used as input for one or more triggers.
Trigger | Conditions that, if met, generate alerts. See [Triggers]({{site.url}}{{site.baseurl}}/observing-your-data/alerting/triggers/).
Trigger | Conditions that, if met, generate alerts.
Alert | Event associated with a trigger. When an alert is created, the trigger performs actions, including sending notifications.
Action | Specific task that is performed when an alert is triggered. See [Actions]({{site.url}}{{site.baseurl}}/observing-your-data/alerting/actions/).
Notification | Message that is sent to users when an alert is triggered. See [Notifications]({{site.url}}{{site.baseurl}}/notifications-plugin/index/).
Action | Specific task that is performed when an alert is triggered.
Notification | Message that is sent to users when an alert is triggered.

## Alerting settings

Some key alerting settings in OpenSearch include the ability to customize trigger conditions, severity levels, notification channels, and recurrence intervals for monitors. You can modify settings like notification message templates, throttling to avoid duplicate alerts, and status expiration periods.

See [Triggers]({{site.url}}{{site.baseurl}}/observing-your-data/alerting/triggers/#trigger-variables) and [Actions]({{site.url}}{{site.baseurl}}/observing-your-data/alerting/actions/) for deeper discussion of the settings.

## Alert states
## Alerting states

The following table lists the alert states.

State | Description
:--- | :---
Active | The alert is ongoing and unacknowledged. Alerts remain in this state until you acknowledge them, delete the trigger associated with the alert, or delete the monitor entirely. Alerts also can be moved out of the active state if the trigger condition is no longer met. For example, if an index has 4,000 documents and a trigger condition is `numOfDocs > 5000`, an active alert is generated when 3,000 documents are added to the index. If the added 3,000 documents are then deleted from the index, the alert changes to the completed state because the condition is no longer triggered.
Acknowledged | The alert is acknowledged but the root cause is not fixed.
Completed | The alert is no longer ongoing. Alerts enter this state after the corresponding trigger evaluates to `false`.
Error | An error occurred while executing the trigger---usually the result of a bad trigger or destination.
`active` | The alert is ongoing and unacknowledged. Alerts remain in this state until you acknowledge them, delete the trigger associated with the alert, or delete the monitor entirely. Alerts also can be moved out of the active state if the trigger condition is no longer met. For example, if an index has 4,000 documents and a trigger condition is `numOfDocs > 5000`, an active alert is generated when 3,000 documents are added to the index. If the added 3,000 documents are then deleted from the index, the alert changes to the completed state because the condition is no longer triggered.
`acknowledged` | The alert is acknowledged but the root cause is not fixed.
`completed` | The alert is no longer ongoing. Alerts enter this state after the corresponding trigger evaluates to `false`.
`error` | An error occurred while executing the trigger---usually the result of a bad trigger or destination.
Deleted | The monitor or trigger associated with this alert was deleted while the alert was ongoing.

## Creating an alert monitor
## Creating alerts from within OpenSearch Dashboards

You can follow these basic steps to create an alert monitor:
You can create alerts at the cluster level and from within OpenSearch Dashboards. This documentation is about OpenSearch Dashboards. See [Alerting API](/observing-your-data/alerting/api/) for details about how to programmatically create, update, and manage monitors and alerts.

The following steps guide you through creating a basic monitor:

1. In the **OpenSearch Plugins** main menu, choose **Alerting**.
1. Choose **Create monitor**. See [Monitors]({{site.url}}{{site.baseurl}}/observing-your-data/alerting/monitors/) for more information about the monitor types.
1. Enter the **Monitor details**, including monitor type, method, and schedule.
1. Select a data source from the dropdown list.
1. Define the metrics in the Query section.
1. Add a trigger. See [Triggers]({{site.url}}{{site.baseurl}}/observing-your-data/alerting/triggers/) for more information about triggers.
1. Add an action. See [Actions]({{site.url}}{{site.baseurl}}/observing-your-data/alerting/actions/) for more information about actions.
1. Select **Create**.
2. Choose **Create monitor**.
3. Enter the **Monitor details**, including monitor type, method, and schedule.
4. Select a data source from the dropdown list.
5. Define the metrics in the Query section.
6. Add a trigger.
7. Add an action.
8. Select **Create**.

## Next steps

Learn more about the following features:

- [Monitors]({{site.url}}{{site.baseurl}}/observing-your-data/alerting/monitors/)
- [Triggers]({{site.url}}{{site.baseurl}}/observing-your-data/alerting/triggers/)
- [Actions]({{site.url}}{{site.baseurl}}/observing-your-data/alerting/actions/)
- [Notifications]({{site.url}}{{site.baseurl}}/notifications-plugin/index/)
- [Alerting dashboards and visualizations]({{site.url}}{{site.baseurl}}/observing-your-data/alerting/dashboards-alerting/)

Learn more about creating specific monitor types in their respective documentation.
6 changes: 3 additions & 3 deletions _observing-your-data/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ redirect_from:

# Observability

Observability is collection of plugins and applications that let you visualize data-driven events by using Piped Processing Language to explore, discover, and query data stored in OpenSearch.
Observability in OpenSearch is collection of plugins and applications that allow you to visualize and analyze data-driven events. These tools use the Piped Processing Language (PPL) to explore and query data stored in OpenSearch clusters. Observability in OpenSearch includes features like event analytics, operational panels, log analytics, and notebooks, providing a comprehensive workflow for gaining insights, monitoring system performance, and proactively identifying and resolving potential issues.

Your experience of exploring data might differ, but if you're new to exploring data to create visualizations, we recommend trying a workflow like the following:
If you are new to Observability in OpenSearch, the following workflow is recommended:

1. Explore data within a certain timeframe using [Piped Processing Language]({{site.url}}{{site.baseurl}}/search-plugins/sql/ppl/index).
1. Explore data using [Piped Processing Language]({{site.url}}{{site.baseurl}}/search-plugins/sql/ppl/index/).
2. Use [event analytics]({{site.url}}{{site.baseurl}}/observing-your-data/event-analytics) to turn data-driven events into visualizations.
![Sample Event Analytics View]({{site.url}}{{site.baseurl}}/images/event-analytics.png)
3. Create [operational panels]({{site.url}}{{site.baseurl}}/observing-your-data/operational-panels) and add visualizations to compare data the way you like.
Expand Down
Binary file added images/alerting-homepage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/dashboards/add-monitor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/dashboards/alerting-config.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/dashboards/alerting-dashboards.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/dashboards/dashboards-app.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/dashboards/save-associated-monitor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/dashboards/save-new-monitor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/dashboards/viewing-events.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/monitor-flyout.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading