Skip to content
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
9 changes: 4 additions & 5 deletions x-pack/docs/en/watcher/condition.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,15 @@
++++

When a watch is triggered, its condition determines whether or not to execute
the watch actions. {watcher} supports the following condition types:
the watch actions. {watcher} supports the following condition types:

* <<condition-always,`always`>>: set the watch condition to `true` so the watch
actions are always executed.
* <<condition-never,`never`>>: set the watch condition to `false` so the watch
* <<condition-always,`always`>>: The condition always evaluates to `true`, so the watch actions are always performed.
* <<condition-never,`never`>>: The condition always evaluates to `false`, so the watch
actions are never executed.
* <<condition-compare,`compare`>>: perform simple comparisons against values
in the watch payload to determine whether or not to execute the watch actions.
* <<condition-array-compare,`array_compare`>>: compare an array of values in the
watch payload to a given value to determine whether or not to execute the watch
watch payload to a given value to determine whether or not to execute the watch
actions.
* <<condition-script,`script`>>: use a script to determine whether or not to
execute the watch actions.
Expand Down
14 changes: 7 additions & 7 deletions x-pack/docs/en/watcher/condition/always.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@
<titleabbrev>Always condition</titleabbrev>
++++

Use the `always` condition to set the condition to `true`. This forces the watch
actions to be executed unless they are <<actions-ack-throttle,throttled>>.
Use the `always` condition to perform the watch actions whenever the watch is triggered, unless they are
<<actions-ack-throttle,throttled>>.

The `always` condition enables you to perform watch actions on a fixed schedule,
such as, _"Every Friday at noon, send a status report email to
The `always` condition enables you to perform watch actions on a fixed schedule,
such as, _"Every Friday at noon, send a status report email to
[email protected]."_

==== Using the always condition

This is the default if you omit the condition definition from a watch.

There are no attributes to specify for the `always` condition. To explicitly
use this condition, specify the condition type and associate it with an empty
There are no attributes to specify for the `always` condition. To explicitly
use this condition, specify the condition type and associate it with an empty
object:

[source,js]
Expand All @@ -26,4 +26,4 @@ object:
"always" : {}
}
--------------------------------------------------
// NOTCONSOLE
// NOTCONSOLE
7 changes: 3 additions & 4 deletions x-pack/docs/en/watcher/condition/never.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
<titleabbrev>Never condition</titleabbrev>
++++

Use the `never` condition to set the condition to `false`. This means the
watch actions are never executed when the watch is triggered. The watch input is
executed, a record is added to the watch history, and the watch execution ends.
Use the `never` condition to skip performing the watch actions whenever the watch is triggered. The watch input is processed, a record is
added to the watch history, and watch execution ends.
This condition is generally used for testing.

==== Using the never condition
Expand All @@ -21,4 +20,4 @@ you specify the condition type and associate it with an empty object:
"never" : {}
}
--------------------------------------------------
// NOTCONSOLE
// NOTCONSOLE