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

[7.1][DOCS] Moves Watcher content into Elasticsearch book (#47147) #47386

Merged
merged 1 commit into from
Oct 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion docs/java-rest/high-level/watcher/ack-watch.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
[id="{upid}-{api}-request"]
==== Execution

{xpack-ref}/actions.html#actions-ack-throttle[Acknowledging a watch] enables you
{ref}/actions.html#actions-ack-throttle[Acknowledging a watch] enables you
to manually throttle execution of a watch's actions. A watch can be acknowledged
through the following request:

Expand Down
4 changes: 2 additions & 2 deletions docs/painless/painless-contexts.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ specialized code may define new ways to use a Painless script.
| Bucket selector aggregation | <<painless-bucket-selector-agg-context, Painless Documentation>>
| {ref}/search-aggregations-pipeline-bucket-selector-aggregation.html[Elasticsearch Documentation]
| Watcher condition | <<painless-watcher-condition-context, Painless Documentation>>
| {xpack-ref}/condition-script.html[Elasticsearch Documentation]
| {ref}/condition-script.html[Elasticsearch Documentation]
| Watcher transform | <<painless-watcher-transform-context, Painless Documentation>>
| {xpack-ref}/transform-script.html[Elasticsearch Documentation]
| {ref}/transform-script.html[Elasticsearch Documentation]
|====

include::painless-contexts/painless-context-examples.asciidoc[]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[[painless-watcher-condition-context]]
=== Watcher condition context

Use a Painless script as a {xpack-ref}/condition-script.html[watch condition]
Use a Painless script as a {ref}/condition-script.html[watch condition]
that determines whether to execute a watch or a particular action within a watch.
Condition scripts return a Boolean value to indicate the status of the condition.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ The following variables are available in all watcher contexts.

`ctx['payload']` (`Map`, read-only)::
The accessible watch data based upon the
{xpack-ref}/input.html[watch input].
{ref}/input.html[watch input].

*API*

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[[painless-watcher-transform-context]]
=== Watcher transform context

Use a Painless script as a {xpack-ref}/transform-script.html[watch transform]
Use a Painless script as a {ref}/transform-script.html[watch transform]
to transform a payload into a new payload for further use in the watch.
Transform scripts return an Object value of the new payload.

Expand Down
3 changes: 2 additions & 1 deletion docs/reference/commands/syskeygen.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ bin/elasticsearch-syskeygen

The command generates a `system_key` file, which you can use to symmetrically
encrypt sensitive data. For example, you can use this key to prevent {watcher}
from returning and storing information that contains clear text credentials. See {xpack-ref}/encrypting-data.html[Encrypting sensitive data in {watcher}].
from returning and storing information that contains clear text credentials. See
<<encrypting-data>>.

IMPORTANT: The system key is a symmetric key, so the same key must be used on
every node in the cluster.
Expand Down
2 changes: 2 additions & 0 deletions docs/reference/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ include::rest-api/index.asciidoc[]

include::security/index.asciidoc[]

include::{xes-repo-dir}/watcher/index.asciidoc[]

include::commands/index.asciidoc[]

include::how-to.asciidoc[]
Expand Down
34 changes: 17 additions & 17 deletions docs/reference/settings/notification-settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,12 @@ Set to `false` to disable {watcher} on the node.
`xpack.watcher.encrypt_sensitive_data`::
Set to `true` to encrypt sensitive data. If this setting is enabled, you
must also specify the `xpack.watcher.encryption_key` setting. For more
information, see
{xpack-ref}/encrypting-data.html[Encrypting sensitive data in {watcher}].
information, see <<encrypting-data>>.

`xpack.watcher.encryption_key` (<<secure-settings,Secure>>)::
Specifies the path to a file that contains a key for encrypting sensitive data.
If `xpack.watcher.encrypt_sensitive_data` is set to `true`, this setting is
required. For more information, see
{xpack-ref}/encrypting-data.html[Encrypting sensitive data in {watcher}].
required. For more information, see <<encrypting-data>>.

`xpack.watcher.history.cleaner_service.enabled`::
added:[6.3.0,Default changed to `true`.]
Expand Down Expand Up @@ -88,7 +86,7 @@ include::ssl-settings.asciidoc[]
==== Email Notification Settings
You can configure the following email notification settings in
`elasticsearch.yml`. For more information about sending notifications
via email, see {xpack-ref}/actions-email.html#configuring-email-actions[Configuring Email].
via email, see <<configuring-email-actions>>.

`xpack.notification.email.account`::
Specifies account information for sending notifications via email. You
Expand All @@ -98,14 +96,15 @@ can specify the following email account attributes:
[[email-account-attributes]]

`profile` (<<cluster-update-settings,Dynamic>>);;
The {xpack-ref}/actions-email.html#configuring-email[email profile] to use to build the MIME
The <<configuring-email,email profile>> to use to build the MIME
messages that are sent from the account. Valid values: `standard`, `gmail` and
`outlook`. Defaults to `standard`.

`email_defaults.*` (<<cluster-update-settings,Dynamic>>);;
An optional set of email attributes to use as defaults
for the emails sent from the account. See {xpack-ref}/actions-email.html#email-action-attributes[
Email Action Attributes] for the supported attributes.
for the emails sent from the account. See
<<email-action-attributes>> for the supported
attributes.

`smtp.auth` (<<cluster-update-settings,Dynamic>>);;
Set to `true` to attempt to authenticate the user using the
Expand Down Expand Up @@ -166,9 +165,9 @@ can specify the following email account attributes:

`xpack.notification.email.html.sanitization.allow`::
Specifies the HTML elements that are allowed in email notifications. For
more information, see {xpack-ref}/actions-email.html#email-html-sanitization[Configuring HTML
Sanitization Options]. You can specify individual HTML elements
and the following HTML feature groups:
more information, see
<<email-html-sanitization>>. You can
specify individual HTML elements and the following HTML feature groups:
+
--
[[html-feature-groups]]
Expand Down Expand Up @@ -220,7 +219,7 @@ Defaults to `true`.
==== Slack Notification Settings
You can configure the following Slack notification settings in
`elasticsearch.yml`. For more information about sending notifications
via Slack, see {xpack-ref}/actions-slack.html#configuring-slack-actions[Configuring Slack].
via Slack, see <<configuring-slack-actions>>.

`xpack.notification.slack` ::
Specifies account information for sending notifications
Expand Down Expand Up @@ -261,7 +260,7 @@ via Slack. You can specify the following Slack account attributes:
==== Jira Notification Settings
You can configure the following Jira notification settings in
`elasticsearch.yml`. For more information about using notifications
to create issues in Jira, see {xpack-ref}/actions-jira.html#configuring-jira-actions[Configuring Jira].
to create issues in Jira, see <<configuring-jira-actions>>.

`xpack.notification.jira` ::
Specifies account information for using notifications to create
Expand All @@ -281,7 +280,7 @@ issues in Jira. You can specify the following Jira account attributes:

`issue_defaults`;;
Default fields values for the issue created in Jira. See
{xpack-ref}/actions-jira.html#jira-action-attributes[Jira Action Attributes] for more information.
<<jira-action-attributes>> for more information.
Optional.
--

Expand All @@ -290,7 +289,7 @@ issues in Jira. You can specify the following Jira account attributes:
==== PagerDuty Notification Settings
You can configure the following PagerDuty notification settings in
`elasticsearch.yml`. For more information about sending notifications
via PagerDuty, see {xpack-ref}/actions-pagerduty.html#configuring-pagerduty-actions[Configuring PagerDuty].
via PagerDuty, see <<configuring-pagerduty-actions>>.


[[pagerduty-account-attributes]]
Expand All @@ -309,8 +308,9 @@ PagerDuty API key] to use to access PagerDuty. Required.
--
+
`event_defaults`;;
Default values for {xpack-ref}/actions-pagerduty.html#pagerduty-event-trigger-incident-attributes[
PagerDuty event attributes]. Optional.
Default values for
<<pagerduty-event-trigger-incident-attributes,PagerDuty event attributes>>.
Optional.
+
--
`description`::
Expand Down
3 changes: 1 addition & 2 deletions docs/reference/setup/bootstrap-checks-xes.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ If you use {watcher} and have chosen to encrypt sensitive data (by setting
the secure settings store.

To pass this bootstrap check, you must set the `xpack.watcher.encryption_key`
on each node in the cluster. For more information, see
{xpack-ref}/encrypting-data.html[Encrypting Sensitive Data in {watcher}].
on each node in the cluster. For more information, see <<encrypting-data>>.

[float]
=== PKI realm check
Expand Down
2 changes: 1 addition & 1 deletion x-pack/docs/en/rest-api/watcher/ack-watch.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<titleabbrev>Ack watch</titleabbrev>
++++

{stack-ov}/actions.html#actions-ack-throttle[Acknowledging a watch] enables you
<<actions-ack-throttle,Acknowledging a watch>> enables you
to manually throttle execution of the watch's actions. An action's
_acknowledgement state_ is stored in the `status.actions.<id>.ack.state`
structure.
Expand Down
3 changes: 1 addition & 2 deletions x-pack/docs/en/rest-api/watcher/activate-watch.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
<titleabbrev>Activate watch</titleabbrev>
++++

A watch can be either
{stack-ov}/how-watcher-works.html#watch-active-state[active or inactive]. This
A watch can be either <<watch-active-state,active or inactive>>. This
API enables you to activate a currently inactive watch.

[float]
Expand Down
3 changes: 1 addition & 2 deletions x-pack/docs/en/rest-api/watcher/deactivate-watch.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
<titleabbrev>Deactivate watch</titleabbrev>
++++

A watch can be either
{stack-ov}/how-watcher-works.html#watch-active-state[active or inactive]. This
A watch can be either <<watch-active-state,active or inactive>>. This
API enables you to deactivate a currently active watch.

[float]
Expand Down
9 changes: 4 additions & 5 deletions x-pack/docs/en/rest-api/watcher/execute-watch.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ This API supports the following fields:
that will be used during the watch execution

| `ignore_condition` | no | false | When set to `true`, the watch execution uses the
{stack-ov}/condition-always.html[Always Condition].
<<condition-always,always condition>>.
This can also be specified as an HTTP parameter.

| `alternative_input` | no | null | When present, the watch uses this object as a payload
instead of executing its own input.

| `action_modes` | no | null | Determines how to handle the watch actions as part of the
watch execution. See <<watcher-api-execute-watch-action-mode, Action Execution Modes>>
watch execution. See <<watcher-api-execute-watch-action-mode>>
for more information.

| `record_execution` | no | false | When set to `true`, the watch record representing the watch
Expand All @@ -75,8 +75,7 @@ This API supports the following fields:
watch is updated, possibly throttling subsequent executions.
This can also be specified as an HTTP parameter.

| `watch` | no | null | When present, this
{stack-ov}/how-watcher-works.html#watch-definition[watch] is used
| `watch` | no | null | When present, this <<watch-definition,watch>> is used
instead of the one specified in the request. This watch is
not persisted to the index and record_execution cannot be set.
|======
Expand All @@ -94,7 +93,7 @@ are five possible modes an action can be associated with:

| `simulate` | The action execution is simulated. Each action type
define its own simulation operation mode. For example, the
{stack-ov}/actions-email.html[email] action creates
<<actions-email,`email` action>> creates
the email that would have been sent but does not actually
send it. In this mode, the action might be throttled if the
current state of the watch indicates it should be.
Expand Down
14 changes: 7 additions & 7 deletions x-pack/docs/en/rest-api/watcher/put-watch.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ IMPORTANT: You must use {kib} or this API to create a watch. Do not put a watch
privileges on the `.watches` index.

When adding a watch you can also define its initial
{stack-ov}/how-watcher-works.html#watch-active-state[active state]. You do that
by setting the `active` parameter.
<<watch-active-state,active state>>. You do that by setting the `active`
parameter.

[float]
==== Path Parameters
Expand All @@ -52,16 +52,16 @@ A watch has the following fields:
|======
| Name | Description

| `trigger` | The {stack-ov}/trigger.html[trigger] that defines when
| `trigger` | The <<trigger,trigger>> that defines when
the watch should run.

| `input` | The {stack-ov}/input.html[input] that defines the input
| `input` | The <<input,input>> that defines the input
that loads the data for the watch.

| `condition` | The {stack-ov}/condition.html[condition] that defines if
| `condition` | The <<condition,condition>> that defines if
the actions should be run.

| `actions` | The list of {stack-ov}/actions.html[actions] that will be
| `actions` | The list of <<actions,actions>> that will be
run if the condition matches

| `metadata` | Metadata json that will be copied into the history entries.
Expand Down Expand Up @@ -159,7 +159,7 @@ PUT _watcher/watch/my-watch
// CONSOLE

When you add a watch you can also define its initial
{stack-ov}/how-watcher-works.html#watch-active-state[active state]. You do that
<<watch-active-state,active state>>. You do that
by setting the `active` parameter. The following command adds a watch and sets
it to be inactive by default:

Expand Down
17 changes: 8 additions & 9 deletions x-pack/docs/en/watcher/actions.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
== Actions

When a watch's condition is met, its actions are executed unless it is being
<<actions-ack-throttle, throttled>>. A watch can perform multiple actions.
<<actions-ack-throttle,throttled>>. A watch can perform multiple actions.
The actions are executed one at a time and each action executes independently.
Any failures encountered while executing an action are recorded in the
action result and in the watch history.
Expand All @@ -16,13 +16,13 @@ support their execution in any way they need. For example, the payload might
serve as a model for a templated email body.

{watcher} supports the following types of actions:
<<actions-email, email>>, <<actions-webhook, webhook>>, <<actions-index, index>>,
<<actions-logging, logging>>, <<actions-slack, Slack>>,
and <<actions-pagerduty, pagerduty>>.
<<actions-email,`email`>>, <<actions-webhook,`webhook`>>, <<actions-index,`index`>>,
<<actions-logging,`logging`>>, <<actions-slack,`slack`>>,
and <<actions-pagerduty,`pagerduty`>>.

[float]
[[actions-ack-throttle]]
=== Acknowledgement and Throttling
=== Acknowledgement and throttling

During the watch execution, once the condition is met, a decision is made per
configured action as to whether it should be throttled. The main purpose of
Expand Down Expand Up @@ -94,7 +94,7 @@ PUT _watcher/watch/error_logs_alert
// CONSOLE
<1> There will be at least 15 minutes between subsequent `email_administrator`
action executions.
<2> See <<actions-email, Email Action>> for more information.
<2> See <<actions-email>> for more information.

You can also define a throttle period at the watch level. The watch-level
throttle period serves as the default throttle period for all of the actions
Expand Down Expand Up @@ -166,15 +166,14 @@ xpack.watcher.execution.default_throttle_period: 15m
--------------------------------------------------

{watcher} also supports acknowledgement-based throttling. You can acknowledge a
watch using the {ref}/watcher-api-ack-watch.html[Ack Watch API] to prevent the
watch using the <<watcher-api-ack-watch,ack watch API>> 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
{ref}/watcher-api-ack-watch.html[Ack Watch API]:
To acknowledge an action, you use the <<watcher-api-ack-watch,ack watch API>>:

[source,js]
----------------------------------------------------------------------
Expand Down
Loading