Skip to content

Commit 0e1e2ef

Browse files
Merge branch 'main' into ea-frontmatter
2 parents 266873a + 0a2e3db commit 0e1e2ef

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+111
-433
lines changed

deploy-manage/deploy/elastic-cloud/restrictions-known-problems.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ Watcher encryption Key Setup is not supported.
7575

7676
Changing the default throttle period is not possible. You can specify a throttle period per watch, however.
7777

78-
Watcher comes preconfigured with a directly usable email account provided by Elastic. However, this account can’t be reconfigured and is subject to some limitations. For more information on the limits of the Elastic mail server, check the [cloud email service limits](../../../explore-analyze/alerts-cases/watcher.md#ec-cloud-email-service-limits)
78+
Watcher comes preconfigured with a directly usable email account provided by Elastic. However, this account can’t be reconfigured and is subject to some limitations. For more information on the limits of the Elastic mail server, check the [cloud email service limits](../../../explore-analyze/alerts-cases/watcher/enable-watcher.md#cloud-email-service-limits)
7979

80-
Alternatively, a custom mail server can be configured as described in [Configuring a custom mail server](../../../explore-analyze/alerts-cases/watcher.md#ec-watcher-custom-mail-server)
80+
Alternatively, a custom mail server can be configured as described in [Configuring a custom mail server](../../../explore-analyze/alerts-cases/watcher/enable-watcher.md#watcher-custom-mail-server)
8181

8282

8383
## Private Link and SSO to Kibana URLs [ec-restrictions-traffic-filters-kibana-sso]

explore-analyze/alerts-cases/watcher.md

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,40 @@ mapped_urls:
1212

1313
# Watcher
1414

15-
% What needs to be done: Lift-and-shift
15+
::::{tip}
16+
{{kib}} Alerting provides a set of built-in actions and alerts that are integrated with applications such as APM, Metrics, Security, and Uptime. You can use {{kib}} Alerting to detect complex conditions within different {{kib}} apps and trigger actions when those conditions are met. For more information, refer to [Alerts and Cases](../alerts-cases.md).
17+
::::
1618

17-
% Use migrated content from existing pages that map to this page:
19+
You can use Watcher to watch for changes or anomalies in your data and perform the necessary actions in response. For example, you might want to:
1820

19-
% - [ ] ./raw-migrated-files/elasticsearch/elasticsearch-reference/xpack-alerting.md
20-
% - [ ] ./raw-migrated-files/cloud/cloud/ec-watcher.md
21-
% - [ ] ./raw-migrated-files/kibana/kibana/watcher-ui.md
22-
% - [ ] ./raw-migrated-files/docs-content/serverless/elasticsearch-differences.md
23-
% - [ ] ./raw-migrated-files/kibana/kibana/secure-reporting.md
21+
* Monitor social media as another way to detect failures in user-facing automated systems like ATMs or ticketing systems. When the number of tweets and posts in an area exceeds a threshold of significance, notify a service technician.
22+
* Monitor your infrastructure, tracking disk usage over time. Open a helpdesk ticket when any servers are likely to run out of free space in the next few days.
23+
* Track network activity to detect malicious activity, and proactively change firewall configuration to reject the malicious user.
24+
* Monitor Elasticsearch, and send immediate notification to the system administrator if nodes leave the cluster or query throughput exceeds an expected range.
25+
* Track application response times and if page-load time exceeds SLAs for more than 5 minutes, open a helpdesk ticket. If SLAs are exceeded for an hour, page the administrator on duty.
2426

25-
% Internal links rely on the following IDs being on this page (e.g. as a heading ID, paragraph ID, etc):
27+
All of these use-cases share a few key properties:
2628

27-
$$$watcher-create-advanced-watch$$$
29+
* The relevant data or changes in data can be identified with a periodic Elasticsearch query.
30+
* The results of the query can be checked against a condition.
31+
* One or more actions are taken if the condition is true — an email is sent, a 3rd party system is notified, or the query results are stored.
2832

29-
$$$ec-cloud-email-service-limits$$$
33+
## How watches work [_how_watches_work]
3034

31-
$$$ec-watcher-custom-mail-server$$$
35+
The {{alert-features}} provide an API for creating, managing and testing *watches*. A watch describes a single alert and can contain multiple notification actions.
3236

33-
$$$watcher-create-threshold-alert$$$
37+
A watch is constructed from four simple building blocks:
3438

35-
$$$watcher-deactivate$$$
39+
Schedule
40+
: A schedule for running a query and checking the condition.
3641

37-
$$$watcher-getting-started$$$
42+
Query
43+
: The query to run as input to the condition. Watches support the full Elasticsearch query language, including aggregations.
44+
45+
Condition
46+
: A condition that determines whether or not to execute the actions. You can use simple conditions (always true), or use scripting for more sophisticated scenarios.
47+
48+
Actions
49+
: One or more actions, such as sending email, pushing data to 3rd party systems through a webhook, or indexing the results of the query.
50+
51+
A full history of all watches is maintained in an Elasticsearch index. This history keeps track of each time a watch is triggered and records the results from the query, whether the condition was met, and what actions were taken.

explore-analyze/alerts-cases/watcher/action-conditions.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,8 @@ mapped_pages:
77
- https://www.elastic.co/guide/en/elasticsearch/reference/current/action-conditions.html
88
---
99

10-
11-
1210
# Adding conditions to actions [action-conditions]
1311

14-
1512
When a watch is triggered, its condition determines whether or not to execute the watch actions. Within each action, you can also add a condition per action. These additional conditions enable a single alert to execute different actions depending on a their respective conditions. The following watch would always send an email, when hits are found from the input search, but only trigger the `notify_pager` action when there are more than 5 hits in the search result.
1613

1714
```console
@@ -67,5 +64,3 @@ PUT _watcher/watch/log_event_watch
6764
```
6865

6966
1. A `condition` that only applies to the `notify_pager` action, which restricts its execution to when the condition succeeds (at least 5 hits in this case).
70-
71-

explore-analyze/alerts-cases/watcher/action-foreach.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,3 @@ PUT _watcher/watch/log_event_watch
4444
```
4545

4646
1. The logging statement will be executed for each of the returned search hits.
47-
48-

explore-analyze/alerts-cases/watcher/actions-email.md

Lines changed: 10 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,8 @@ mapped_pages:
77
- https://www.elastic.co/guide/en/elasticsearch/reference/current/actions-email.html
88
---
99

10-
11-
1210
# Email action [actions-email]
1311

14-
1512
Use the `email` action to send email notifications. To send email, you must [configure at least one email account](#configuring-email) in `elasticsearch.yml`.
1613

1714
Email notifications can be plain text or styled using HTML. You can include information from the watch execution payload using [templates](how-watcher-works.md#templates) and attach the entire watch payload to the message.
@@ -42,8 +39,6 @@ For example, the following email action uses a template to include data from the
4239
4. The subject of the email can contain static text and Mustache [templates](how-watcher-works.md#templates).
4340
5. The body of the email can contain static text and Mustache [templates](how-watcher-works.md#templates). Must be specified in the action definition or in the email account configuration.
4441

45-
46-
4742
## Configuring email attachments [configuring-email-attachments]
4843

4944
You can attach the execution context payload or data from an any HTTP service to the email notification. There is no limit on the number of attachments you can configure.
@@ -111,8 +106,6 @@ You can use the `reporting` attachment type in an `email` action to automaticall
111106

112107
See [Automating report generation](../../report-and-share/automating-report-generation.md).
113108

114-
115-
116109
## Email action attributes [email-action-attributes]
117110

118111
| Name | Required | Default | Description |
@@ -142,7 +135,6 @@ $$$address-list$$$
142135
Address List
143136
: A list of addresses can be specified as a an array: `[ 'Personal Name <[email protected]>', '[email protected]' ]`.
144137

145-
146138
## Configuring email accounts [configuring-email]
147139

148140
{{watcher}} can send email using any SMTP email service. Email messages can contain basic HTML tags. You can control which groups of tags are allowed by [Configuring HTML Sanitization Options](#email-html-sanitization).
@@ -151,7 +143,8 @@ You configure the accounts {{watcher}} can use to send email in the `xpack.notif
151143

152144
If your email account is configured to require two step verification, you need to generate and use a unique App Password to send email from {{watcher}}. Authentication will fail if you use your primary password.
153145

154-
$$$email-profile$$$
146+
### Email profiles [email-profile]
147+
155148
{{watcher}} provides three email profiles that control how MIME messages are structured: `standard` (default), `gmail`, and `outlook`. These profiles accommodate differences in how various email systems interpret the MIME standard. If you are using Gmail or Outlook, we recommend using the corresponding profile. Use the `standard` profile if you are using another email system.
156149

157150
For more information about configuring {{watcher}} to work with different email systems, see:
@@ -161,7 +154,7 @@ For more information about configuring {{watcher}} to work with different email
161154
* [Sending email from Microsoft Exchange](#exchange)
162155
* [Sending email from Amazon SES (Simple Email Service)](#amazon-ses)
163156

164-
If you configure multiple email accounts, you must either configure a default account or specify which account the email should be sent with in the [`email`]() action.
157+
If you configure multiple email accounts, you must either configure a default account or specify which account the email should be sent with in the `email` action.
165158

166159
```yaml
167160
xpack.notification.email:
@@ -173,8 +166,7 @@ xpack.notification.email:
173166
...
174167
```
175168
176-
177-
#### Sending email from Gmail [gmail]
169+
### Sending email from Gmail [gmail]
178170
179171
Use the following email account settings to send email from the [Gmail](https://mail.google.com) SMTP service:
180172
@@ -200,8 +192,7 @@ If you get an authentication error that indicates that you need to continue the
200192

201193
If two-step verification is enabled for your account, you must generate and use a unique App Password to send email from {{watcher}}. See [Sign in using App Passwords](https://support.google.com/accounts/answer/185833?hl=en) for more information.
202194

203-
204-
#### Sending email from Outlook.com [outlook]
195+
#### Sending email from Outlook.com [outlook]
205196

206197
Use the following email account settings to send email action from the [Outlook.com](https://www.outlook.com/) SMTP service:
207198

@@ -225,13 +216,11 @@ bin/elasticsearch-keystore add xpack.notification.email.account.outlook_account.
225216

226217
When sending emails, you have to provide a from address, either a default one in your account configuration or as part of the email action in the watch.
227218

228-
::::{note}
219+
::::{note}
229220
You need to use a unique App Password if two-step verification is enabled. See [App passwords and two-step verification](http://windows.microsoft.com/en-us/windows/app-passwords-two-step-verification) for more information.
230221
::::
231222

232-
233-
234-
#### Sending email from Amazon SES (Simple Email Service) [amazon-ses]
223+
#### Sending email from Amazon SES (Simple Email Service) [amazon-ses]
235224

236225
Use the following email account settings to send email from the [Amazon Simple Email Service](http://aws.amazon.com/ses) (SES) SMTP service:
237226

@@ -252,20 +241,17 @@ xpack.notification.email.account:
252241
1. In certain cases `email_defaults.from` is validated by Amazon SES to ensure that it is a valid local email account.
253242
2. `smtp.host` varies depending on the region.
254243

255-
256244
To store the account SMTP password, use the keystore command (see [secure settings](../../../deploy-manage/security/secure-settings.md))
257245

258246
```yaml
259247
bin/elasticsearch-keystore add xpack.notification.email.account.ses_account.smtp.secure_password
260248
```
261249

262-
::::{note}
250+
::::{note}
263251
You need to use your Amazon SES SMTP credentials to send email through Amazon SES. For more information, see [Obtaining Your Amazon SES SMTP Credentials](http://docs.aws.amazon.com/ses/latest/DeveloperGuide/smtp-credentials.md). You might also need to verify [your email address](https://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-email-addresses.md) or [your whole domain](https://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-domains.md) at AWS.
264252
::::
265253

266-
267-
268-
#### Sending email from Microsoft Exchange [exchange]
254+
#### Sending email from Microsoft Exchange [exchange]
269255

270256
Use the following email account settings to send email action from Microsoft Exchange:
271257

@@ -286,15 +272,13 @@ xpack.notification.email.account:
286272
1. Some organizations configure Exchange to validate that the `from` field is a valid local email account.
287273
2. Many organizations support use of your email address as your username, though it is a good idea to check with your system administrator if you receive authentication-related failures.
288274

289-
290275
To store the account SMTP password, use the keystore command (see [secure settings](../../../deploy-manage/security/secure-settings.md))
291276

292277
```yaml
293278
bin/elasticsearch-keystore add xpack.notification.email.account.exchange_account.smtp.secure_password
294279
```
295280

296-
297-
#### Configuring HTML sanitization options [email-html-sanitization]
281+
#### Configuring HTML sanitization options [email-html-sanitization]
298282

299283
The `email` action supports sending messages with an HTML body. However, for security reasons, {{watcher}} [sanitizes](https://en.wikipedia.org/wiki/HTML_sanitization) the HTML.
300284

@@ -313,5 +297,3 @@ To disable sanitization entirely, add the following setting to `elasticsearch.ym
313297
```yaml
314298
xpack.notification.email.html.sanitization.enabled: false
315299
```
316-
317-

explore-analyze/alerts-cases/watcher/actions-index.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,8 @@ mapped_pages:
77
- https://www.elastic.co/guide/en/elasticsearch/reference/current/actions-index.html
88
---
99

10-
11-
1210
# Index action [actions-index]
1311

14-
1512
Use the `index` action to index data into Elasticsearch. See [Index action attributes](#index-action-attributes) for the supported attributes.
1613

1714
## Configuring index actions [_configuring_index_actions]
@@ -37,8 +34,6 @@ The following snippet shows a simple `index` action definition:
3734
4. The index, alias, or data stream to which the data will be written
3835
5. An optional `_id` for the document
3936

40-
41-
4237
## Index action attributes [index-action-attributes]
4338

4439
| Name | Required | Default | Description |
@@ -50,7 +45,6 @@ The following snippet shows a simple `index` action definition:
5045
| `timeout` | no | 60s | The timeout for waiting for the index api call to return. If no response is returned within this time, the index action times out and fails. This setting overrides the default timeouts. |
5146
| `refresh` | no | - | Optional setting of the [refresh policy](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-refresh.html) for the write request |
5247

53-
5448
## Multi-document support [anatomy-actions-index-multi-doc-support]
5549

5650
Like with all other actions, you can use a [transform](transform.md) to replace the current execution context payload with another and by that change the document that will end up indexed.
@@ -90,6 +84,3 @@ The following snippet shows a multi-document `index` action definition:
9084
3. A new `severity` field derived from the original document
9185
4. The payload `_doc` field which is an array of documents
9286
5. Since the `_index` was informed per document this should be empty
93-
94-
95-

explore-analyze/alerts-cases/watcher/actions-jira.md

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,8 @@ mapped_pages:
77
- https://www.elastic.co/guide/en/elasticsearch/reference/current/actions-jira.html
88
---
99

10-
11-
1210
# Jira action [actions-jira]
1311

14-
1512
Use the `jira` action to create issues in [Atlassian’s Jira Software](https://www.atlassian.com/software/jira). To create issues you need to [configure at least one Jira account](#configuring-jira) in `elasticsearch.yml`.
1613

1714
## Configuring Jira actions [configuring-jira-actions]
@@ -54,17 +51,14 @@ The following snippet shows a simple jira action definition:
5451
6. The labels to apply to the Jira issue.
5552
7. The priority of the Jira issue.
5653

57-
58-
5954
## Jira action attributes [jira-action-attributes]
6055

6156
Depending of how Jira projects are configured, the issues can have many different fields and values. Therefore the `jira` action can accept any type of sub fields within its `issue` field. These fields will be directly used when calling Jira’s [Create Issue API](https://docs.atlassian.com/jira/REST/cloud/#api/2/issue-createIssue), allowing any type of custom fields to be used.
6257

63-
::::{note}
58+
::::{note}
6459
The `project.key` (or `project.id`), the `issuetype.name` (or `issuetype.id`) and `issue.summary` are always required to create an issue in Jira.
6560
::::
6661

67-
6862
| Name | Required | Description |
6963
| --- | --- | --- |
7064
| `account` | no | The Jira account to use to send the message. |
@@ -81,7 +75,6 @@ The `project.key` (or `project.id`), the `issuetype.name` (or `issuetype.id`) an
8175
| `fields.environment` | no | Name of the environment related to the issue. |
8276
| `fields.customfield_XXX` | no | Custom field XXX of the issue (ex: "customfield_10000": "09/Jun/81") |
8377

84-
8578
## Configuring Jira accounts [configuring-jira]
8679

8780
You configure the accounts {{watcher}} can use to communicate with Jira in the `xpack.notification.jira` namespace in `elasticsearch.yml`.
@@ -93,32 +86,28 @@ bin/elasticsearch-keystore add xpack.notification.jira.account.monitoring.secure
9386
bin/elasticsearch-keystore add xpack.notification.jira.account.monitoring.secure_user
9487
bin/elasticsearch-keystore add xpack.notification.jira.account.monitoring.secure_password
9588
```
96-
97-
::::{warning}
89+
::::{warning}
9890
Storing sensitive data (`url`, `user` and `password`) in the configuration file or the cluster settings is insecure and has been deprecated. Please use {{es}}'s secure [keystore](../../../deploy-manage/security/secure-settings.md) method instead.
9991

10092
::::
10193

102-
10394
To avoid credentials that transit in clear text over the network, {{watcher}} will reject `url` settings like `http://internal-jira.elastic.co` that are based on plain text HTTP protocol. This default behavior can be disabled with the explicit `allow_http` setting:
10495

105-
::::{note}
96+
::::{note}
10697
The `url` field can also contain a path, that is used to create an issue. By default this is `/rest/api/2/issue`. If you set this as well, make sure that this path is the full path to the endpoint to create an issue.
10798
::::
10899

109-
110100
```yaml
111101
xpack.notification.jira:
112102
account:
113103
monitoring:
114104
allow_http: true
115105
```
116106
117-
::::{warning}
107+
::::{warning}
118108
It is strongly advised to use Basic Authentication with secured HTTPS protocol only.
119109
::::
120110
121-
122111
You can also specify defaults for the [Jira issues](https://www.elastic.co/guide/en/elasticsearch/reference/current/notification-settings.html#jira-account-attributes):
123112
124113
```yaml
@@ -134,7 +123,7 @@ xpack.notification.jira:
134123
labels: ["auto"]
135124
```
136125
137-
If you configure multiple Jira accounts, you either need to configure a default account or specify which account the notification should be sent with in the [`jira`]() action.
126+
If you configure multiple Jira accounts, you either need to configure a default account or specify which account the notification should be sent with in the `jira` action.
138127

139128
```yaml
140129
xpack.notification.jira:
@@ -145,5 +134,3 @@ xpack.notification.jira:
145134
team2:
146135
...
147136
```
148-
149-

explore-analyze/alerts-cases/watcher/actions-logging.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,8 @@ mapped_pages:
77
- https://www.elastic.co/guide/en/elasticsearch/reference/current/actions-logging.html
88
---
99

10-
11-
1210
# Logging action [actions-logging]
1311

14-
1512
Use the `logging` action to log text to the standard Elasticsearch logs. See [Logging action attributes](#logging-action-attributes) for the supported attributes.
1613

1714
This action is primarily used during development and for debugging purposes.
@@ -37,14 +34,10 @@ The following snippet shows a simple logging action definition:
3734
2. An optional [transform](transform.md) to transform the payload before executing the `logging` action.
3835
3. The text to be logged.
3936

40-
41-
4237
## Logging action attributes [logging-action-attributes]
4338

4439
| Name | Required | Default | Description |
4540
| --- | --- | --- | --- |
4641
| `text` | yes | - | The text that should be logged. Can be static text or include Mustache [templates](how-watcher-works.md#templates). |
4742
| `category` | no | xpack.watcher.actions.logging | The category under which the text will be logged. |
4843
| `level` | no | info | The logging level. Valid values are: `error`, `warn`, `info`, `debug` and `trace`. |
49-
50-

0 commit comments

Comments
 (0)