Skip to content

Commit

Permalink
[DOCS] Moves Watcher content into Elasticsearch book (#47147)
Browse files Browse the repository at this point in the history
Co-Authored-By: James Rodewig <[email protected]>
  • Loading branch information
lcawl and jrodewig authored Oct 2, 2019
1 parent 9913b0e commit 5b1fc3c
Show file tree
Hide file tree
Showing 70 changed files with 568 additions and 470 deletions.
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 @@ -10,7 +10,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[watcher condition]
Use a Painless script as a {ref}/condition-script.html[watcher condition]
to test if a response is necessary.

*Variables*
Expand All @@ -26,7 +26,7 @@ to test if a response is necessary.

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

*Return*

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 to {xpack-ref}/transform-script.html[transform] watch
Use a Painless script to {ref}/transform-script.html[transform] watch
data into a new payload for use in a response to a condition.

*Variables*
Expand All @@ -26,7 +26,7 @@ data into a new payload for use in a response to a condition.

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


*Return*
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 @@ -67,6 +67,8 @@ include::rollup/index.asciidoc[]

include::frozen-indices.asciidoc[]

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

include::rest-api/index.asciidoc[]

include::commands/index.asciidoc[]
Expand Down
3 changes: 1 addition & 2 deletions docs/reference/release-notes/6.0.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -1279,8 +1279,7 @@ Security::

Watcher::
* Added verification that the required templates exist before {watcher} starts.
For more information, see
{stack-ov}/how-watcher-works.html#scripts-templates[Scripts and Templates].
For more information, see <<scripts-templates>>.
* Added the `xpack.watcher.history.cleaner_service.enabled` setting. You can use
this setting to enable or disable the cleaner service, which removes previous
versions of {watcher} indices (for example, .watcher-history*) when it
Expand Down
5 changes: 2 additions & 3 deletions docs/reference/release-notes/6.2.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,7 @@ Watcher::
* Fixed the serialization of failed hipchat messages, such that it no longer
tries to write the status field twice.
* Fixed TransformInput toXContent serialization errors. For more information,
see
{stack-ov}/input-chain.html#_transforming_chained_input_data[Transforming Chained Input Data].
see <<_transforming_chained_input_data>>.


Allocation::
Expand Down Expand Up @@ -434,7 +433,7 @@ more information, see {stack-ov}/saml-realm.html[SAML authentication].

Watcher::
* Added a transform input for chained input. For more information, see
{stack-ov}/input-chain.html#_transforming_chained_input_data[Transforming Chained Input Data].
<<_transforming_chained_input_data>>.

[float]
=== Enhancements
Expand Down
45 changes: 23 additions & 22 deletions docs/reference/settings/notification-settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@
++++

You configure `xpack.notification` settings in `elasticsearch.yml` to
send set up {watcher} and send notifications via <<email-notification-settings, email>>,
<<hipchat-notification-settings, HipChat>>,
send set up {watcher} and send notifications via
<<email-notification-settings,email>>,
<<hipchat-notification-settings,HipChat>>,
<<slack-notification-settings,Slack>>, and
<<pagerduty-notification-settings, PagerDuty>>. Dynamic settings can also be updated
<<pagerduty-notification-settings,PagerDuty>>. Dynamic settings can also be updated
across a cluster with the <<cluster-update-settings,cluster update settings API>>.

[float]
Expand All @@ -23,14 +24,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
{stack-ov}/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
{stack-ov}/encrypting-data.html[Encrypting sensitive data in {watcher}].
required. For more information, see <<encrypting-data>>.

`xpack.watcher.history.cleaner_service.enabled`::
ifdef::asciidoctor[]
Expand Down Expand Up @@ -80,7 +79,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 {stack-ov}/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 @@ -90,14 +89,15 @@ can specify the following email account attributes:
[[email-account-attributes]]

`profile` (<<cluster-update-settings,Dynamic>>);;
The {stack-ov}/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 {stack-ov}/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 @@ -161,9 +161,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 {stack-ov}/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 @@ -212,10 +212,10 @@ Defaults to `true`.

[float]
[[hipchat-notification-settings]]
==== HipChat Notification Settings
==== HipChat notification settings
You can configure the following HipChat notification settings in
`elasticsearch.yml`. For more information about sending notifications
via HipChat, see {stack-ov}/actions-hipchat.html#configuring-hipchat-actions[Configuring HipChat].
via HipChat, see <<configuring-hipchat-actions>>.

`xpack.notification.hipchat` ::
Specifies account information for sending notifications
Expand Down Expand Up @@ -266,7 +266,7 @@ via HipChat. You can specify the following HipChat account attributes:
==== Slack Notification Settings
You can configure the following Slack notification settings in
`elasticsearch.yml`. For more information about sending notifications
via Slack, see {stack-ov}/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 @@ -310,7 +310,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 {stack-ov}/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 Down Expand Up @@ -339,7 +339,7 @@ issues in Jira. You can specify the following Jira account attributes:

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

Expand All @@ -348,7 +348,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 {stack-ov}/actions-pagerduty.html#configuring-pagerduty-actions[Configuring PagerDuty].
via PagerDuty, see <<configuring-pagerduty-actions>>.


[[pagerduty-account-attributes]]
Expand All @@ -372,8 +372,9 @@ PagerDuty API key] to use to access PagerDuty. Required.
--
+
`event_defaults`;;
Default values for {stack-ov}/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,7 +27,7 @@ IMPORTANT: Putting a watch must be done via this API only. Do not put a watch
privileges are granted to anyone over the `.watches` index.

When adding a watch you can also define its initial
{xpack-ref}/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.

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

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

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

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

| `actions` | The list of {xpack-ref}/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 All @@ -75,7 +75,7 @@ A watch has the following fields:
==== Authorization

You must have `manage_watcher` cluster privileges to use this API. For more
information, see {xpack-ref}/security-privileges.html[Security Privileges].
information, see {stack-ov}/security-privileges.html[Security Privileges].

[float]
==== Security Integration
Expand Down Expand Up @@ -148,7 +148,7 @@ PUT _xpack/watcher/watch/my-watch
// CONSOLE

When you add a watch you can also define its initial
{xpack-ref}/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
Loading

0 comments on commit 5b1fc3c

Please sign in to comment.