Skip to content

Commit

Permalink
Merge branch 'main' into replace-api-links-troubleshoot
Browse files Browse the repository at this point in the history
  • Loading branch information
colleenmcginnis authored Feb 13, 2025
2 parents 5c8fffc + fb2fc77 commit 594a8ab
Show file tree
Hide file tree
Showing 162 changed files with 933 additions and 1,583 deletions.
2 changes: 1 addition & 1 deletion explore-analyze/alerts-cases/watcher/actions-index.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ The following snippet shows a simple `index` action definition:
| --- | --- | --- | --- |
| `index` | yes* | - | The index, alias, or data stream to index into. Date math expressions like `<my-index-{now/d}>` are also supported.<br><br>*If you dynamically set an `_index` value, this parameter isn’t required. See [Multi-document support](#anatomy-actions-index-multi-doc-support).<br> |
| `doc_id` | no | - | The optional `_id` of the document. |
| `op_type` | no | `index` | The [op_type](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html#docs-index-api-op_type) for the index operation. Must be one of either `index` or `create`. Must be `create` if `index` is a data stream. |
| `op_type` | no | `index` | The [op_type](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-create) for the index operation. Must be one of either `index` or `create`. Must be `create` if `index` is a data stream. |
| `execution_time_field` | no | - | The field that will store/index the watch execution time. |
| `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. |
| `refresh` | no | - | Optional setting of the [refresh policy](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-refresh.html) for the write request |
Expand Down
4 changes: 2 additions & 2 deletions explore-analyze/alerts-cases/watcher/actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,9 @@ If you do not define a throttle period at the action or watch level, the global
xpack.watcher.execution.default_throttle_period: 15m
```
{{watcher}} also supports acknowledgement-based throttling. You can acknowledge a watch using the [ack watch API](https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-ack-watch.html) to prevent the watch actions from being executed again while the watch condition remains `true`. This essentially tells {{watcher}} "I received the notification and I’m handling it, please do not notify me about this error again". An acknowledged watch action remains in the `acked` state until the watch’s condition evaluates to `false`. When that happens, the action’s state changes to `awaits_successful_execution`.
{{watcher}} also supports acknowledgement-based throttling. You can acknowledge a watch using the [ack watch API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-ack-watch) to prevent the watch actions from being executed again while the watch condition remains `true`. This essentially tells {{watcher}} "I received the notification and I’m handling it, please do not notify me about this error again". An acknowledged watch action remains in the `acked` state until the watch’s condition evaluates to `false`. When that happens, the action’s state changes to `awaits_successful_execution`.

To acknowledge an action, you use the [ack watch API](https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-ack-watch.html):
To acknowledge an action, you use the [ack watch API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-ack-watch):

```console
POST _watcher/watch/<id>/_ack/<action_ids>
Expand Down
6 changes: 3 additions & 3 deletions explore-analyze/alerts-cases/watcher/how-watcher-works.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ A watch consists of a *trigger*, *input*, *condition*, and *actions*. The action
: Specify what happens when the watch condition is met.

$$$watch-definition-example$$$
For example, the following snippet shows a [create or update watch](https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-put-watch.html) request that defines a watch that looks for log error events:
For example, the following snippet shows a [create or update watch](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-put-watch) request that defines a watch that looks for log error events:

```console
PUT _watcher/watch/log_errors
Expand Down Expand Up @@ -167,10 +167,10 @@ By default, when you add a watch it is immediately set to the *active* state, re

You can also set a watch to the *inactive* state. Inactive watches are not registered with a trigger engine and can never be triggered.

To set a watch to the inactive state when you create it, set the [`active`](https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-put-watch.html) parameter to *inactive*. To deactivate an existing watch, use the [deactivate watch API](https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-deactivate-watch.html). To reactivate an inactive watch, use the [activate watch API](https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-activate-watch.html).
To set a watch to the inactive state when you create it, set the [`active`](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-put-watch) parameter to *inactive*. To deactivate an existing watch, use the [deactivate watch API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-deactivate-watch). To reactivate an inactive watch, use the [activate watch API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-activate-watch).

::::{note}
You can use the [execute watch API](https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-execute-watch.html) to force the execution of a watch even when it is inactive.
You can use the [execute watch API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-execute-watch) to force the execution of a watch even when it is inactive.
::::


Expand Down
4 changes: 2 additions & 2 deletions explore-analyze/alerts-cases/watcher/input-http.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Use the `http` input to submit a request to an HTTP endpoint and load the respon
With the `http` input, you can:

* Query external Elasticsearch clusters. The `http` input provides a way to submit search requests to clusters other than the one {{watcher}} is running on. This is useful when you’re running a dedicated {{watcher}} cluster or if you need to search clusters that are running different Elasticsearch versions.
* Query Elasticsearch APIs other than the search API. For example, you might want to load data from the [nodes stats](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-stats.html), [cluster health](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-health.html) or [cluster state](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-state.html) APIs.
* Query Elasticsearch APIs other than the search API. For example, you might want to load data from the [nodes stats](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-nodes-stats), [cluster health](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-health) or [cluster state](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-state) APIs.
* Query external web services. The `http` input enables you to load data from any service that exposes an HTTP endpoint. This provides a bridge between Elasticsearch clusters and other systems.

## Querying external Elasticsearch clusters [_querying_external_elasticsearch_clusters]
Expand Down Expand Up @@ -50,7 +50,7 @@ You can use the full Elasticsearch [Query DSL](../../query-filter/languages/quer

## Calling Elasticsearch APIs [_calling_elasticsearch_apis]

To load the data from other Elasticsearch APIs, specify the API endpoint as the `path` attribute. Use the `params` attribute to specify query string parameters. For example, the following `http` input calls the [cluster stats](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-stats.html) API and enables the `human` attribute:
To load the data from other Elasticsearch APIs, specify the API endpoint as the `path` attribute. Use the `params` attribute to specify query string parameters. For example, the following `http` input calls the [cluster stats](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-stats) API and enables the `human` attribute:

```js
"input" : {
Expand Down
6 changes: 3 additions & 3 deletions explore-analyze/alerts-cases/watcher/input-search.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Use the `search` input to load the results of an Elasticsearch search request in
In the search input’s `request` object, you specify:

* The indices you want to search
* The [search type](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-search.html#search-type)
* The [search type](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search)
* The search request body

The search request body supports the full Elasticsearch Query DSL—​it’s the same as the body of an Elasticsearch `_search` request.
Expand Down Expand Up @@ -137,9 +137,9 @@ The total number of hits in the search response is returned as an object in the

| Name | Required | Default | Description |
| --- | --- | --- | --- |
| `request.search_type` | no | `query_then_fetch` | The [type](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-search.html#search-type) of search request to perform. Valid values are: `dfs_query_then_fetch` and `query_then_fetch`. The Elasticsearch default is `query_then_fetch`. |
| `request.search_type` | no | `query_then_fetch` | The [type](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search) of search request to perform. Valid values are: `dfs_query_then_fetch` and `query_then_fetch`. The Elasticsearch default is `query_then_fetch`. |
| `request.indices` | no | - | The indices to search. If omitted, all indices are searched, which is the default behaviour in Elasticsearch. |
| `request.body` | no | - | The body of the request. The [request body](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-search.html) follows the same structure you normally send in the body of a REST `_search` request. The body can be static text or include `mustache` [templates](how-watcher-works.md#templates). |
| `request.body` | no | - | The body of the request. The [request body](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search) follows the same structure you normally send in the body of a REST `_search` request. The body can be static text or include `mustache` [templates](how-watcher-works.md#templates). |
| `request.template` | no | - | The body of the search template. See [configure templates](how-watcher-works.md#templates) for more information. |
| `request.indices_options.expand_wildcards` | no | `open` | How to expand wildcards. Valid values are: `all`, `open`, `closed`, and `none` See [`expand_wildcards`](https://www.elastic.co/guide/en/elasticsearch/reference/current/api-conventions.html#api-multi-index) for more information. |
| `request.indices_options.ignore_unavailable` | no | `true` | Whether the search should ignore unavailable indices. See [`ignore_unavailable`](https://www.elastic.co/guide/en/elasticsearch/reference/current/api-conventions.html#api-multi-index) for more information. |
Expand Down
12 changes: 6 additions & 6 deletions explore-analyze/alerts-cases/watcher/managing-watches.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ mapped_pages:

{{watcher}} provides as set of APIs you can use to manage your watches:

* Use the [create or update watch API](https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-put-watch.html) to add or update watches
* Use the [get watch API](https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-get-watch.html) to retrieve watches
* Use the [delete watch API](https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-delete-watch.html) to delete watches
* Use the [activate watch API](https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-activate-watch.html) to activate watches
* Use the [deactivate watch API](https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-deactivate-watch.html) to deactivate watches
* Use the [ack watch API](https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-ack-watch.html) to acknowledge watches
* Use the [create or update watch API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-put-watch) to add or update watches
* Use the [get watch API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-get-watch) to retrieve watches
* Use the [delete watch API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-delete-watch) to delete watches
* Use the [activate watch API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-activate-watch) to activate watches
* Use the [deactivate watch API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-deactivate-watch) to deactivate watches
* Use the [ack watch API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-ack-watch) to acknowledge watches

## Listing watches [listing-watches]

Expand Down
4 changes: 2 additions & 2 deletions explore-analyze/alerts-cases/watcher/transform-search.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ The following table lists all available settings for the search {{watcher-transf

| Name | Required | Default | Description |
| --- | --- | --- | --- |
| `request.search_type` | no | query_then_fetch | The search [type](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-search.html#search-type). |
| `request.search_type` | no | query_then_fetch | The search [type](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search). |
| `request.indices` | no | all indices | One or more indices to search on. |
| `request.body` | no | `match_all` query | The body of the request. The [request body](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-search.html) follows the same structure you normally send in the body of a REST `_search` request. The body can be static text or include `mustache` [templates](how-watcher-works.md#templates). |
| `request.body` | no | `match_all` query | The body of the request. The [request body](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search) follows the same structure you normally send in the body of a REST `_search` request. The body can be static text or include `mustache` [templates](how-watcher-works.md#templates). |
| `request.indices_options.expand_wildcards` | no | `open` | Determines how to expand indices wildcards. An array consisting of a combination of `open`, `closed`, and `hidden`. Alternatively a value of `none` or `all`. (see [multi-target syntax](https://www.elastic.co/guide/en/elasticsearch/reference/current/api-conventions.html#api-multi-index)) |
| `request.indices_options.ignore_unavailable` | no | `true` | A boolean value that determines whether the search should leniently ignore unavailable indices (see [multi-target syntax](https://www.elastic.co/guide/en/elasticsearch/reference/current/api-conventions.html#api-multi-index)) |
| `request.indices_options.allow_no_indices` | no | `true` | A boolean value that determines whether the search should leniently return no results when no indices are resolved (see [multi-target syntax](https://www.elastic.co/guide/en/elasticsearch/reference/current/api-conventions.html#api-multi-index)) |
Expand Down
4 changes: 2 additions & 2 deletions explore-analyze/alerts-cases/watcher/watch-cluster-status.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ PUT _watcher/watch/cluster_health_watch

1. Schedules are typically configured to run less frequently. This example sets the interval to 10 seconds to you can easily see the watches being triggered. Since this watch runs so frequently, don’t forget to [delete the watch](#health-delete) when you’re done experimenting.

To get the status of your cluster, you can call the [cluster health API](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-health.html):
To get the status of your cluster, you can call the [cluster health API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-health):

```console
GET _cluster/health?pretty
Expand Down Expand Up @@ -224,7 +224,7 @@ GET .watcher-history*/_search?pretty

Since the `cluster_health_watch` is configured to run every 10 seconds, make sure you delete it when you’re done experimenting. Otherwise, you’ll spam yourself indefinitely.

To remove the watch, use the [delete watch API](https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-delete-watch.html):
To remove the watch, use the [delete watch API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-delete-watch):

```console
DELETE _watcher/watch/cluster_health_watch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ PUT _watcher/watch/log_error_watch

Since the `log_error_watch` is configured to run every 10 seconds, make sure you delete it when you’re done experimenting. Otherwise, the noise from this sample watch will make it hard to see what else is going on in your watch history and log file.

To remove the watch, use the [delete watch API](https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-delete-watch.html):
To remove the watch, use the [delete watch API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-delete-watch):

```console
DELETE _watcher/watch/log_error_watch
Expand Down
Loading

0 comments on commit 594a8ab

Please sign in to comment.