diff --git a/docs/build.gradle b/docs/build.gradle index c6a7a8d48374b..7b7898237fa30 100644 --- a/docs/build.gradle +++ b/docs/build.gradle @@ -33,6 +33,9 @@ buildRestTests.expectedUnconvertedCandidates = [ 'reference/ml/apis/post-data.asciidoc', 'reference/ml/apis/revert-snapshot.asciidoc', 'reference/ml/apis/update-snapshot.asciidoc', + 'reference/watcher/apis/put-watch.asciidoc', + 'reference/watcher/apis/stats.asciidoc', + 'reference/watcher/example-watches/watching-time-series-data.asciidoc', ] integTestCluster { @@ -101,6 +104,7 @@ buildRestTests.docs = fileTree(projectDir) { exclude 'reference/rollup/apis/delete-job.asciidoc' exclude 'reference/rollup/apis/get-job.asciidoc' exclude 'reference/rollup/apis/rollup-caps.asciidoc' + exclude 'reference/watcher/reference/actions.asciidoc' } listSnippets.docs = buildRestTests.docs @@ -1096,5 +1100,40 @@ buildRestTests.setups['calendar_outages_addevent'] = buildRestTests.setups['cale { "description": "event 3", "start_time": "1514160000000", "end_time": "1514246400000"} ]} ''' - - +buildRestTests.setups['my_inactive_watch'] = ''' + - do: + xpack.watcher.put_watch: + id: "my_watch" + active: false + body: > + { + "trigger": { + "schedule": { + "hourly": { + "minute": [ 0, 5 ] + } + } + }, + "input": { + "simple": { + "payload": { + "send": "yes" + } + } + }, + "condition": { + "always": {} + }, + "actions": { + "test_index": { + "index": { + "index": "test", + "doc_type": "test2" + } + } + } + } + - match: { _id: "my_watch" } +''' +buildRestTests.setups['my_active_watch'] = buildRestTests.setups['my_inactive_watch'].replace( + 'active: false', 'active: true') diff --git a/docs/reference/rest-api/index.asciidoc b/docs/reference/rest-api/index.asciidoc index b80e8badf5bb3..a477fedc4249b 100644 --- a/docs/reference/rest-api/index.asciidoc +++ b/docs/reference/rest-api/index.asciidoc @@ -25,5 +25,5 @@ include::{es-repo-dir}/migration/migration.asciidoc[] include::{es-repo-dir}/ml/apis/ml-api.asciidoc[] include::{es-repo-dir}/rollup/rollup-api.asciidoc[] include::{xes-repo-dir}/rest-api/security.asciidoc[] -include::{xes-repo-dir}/rest-api/watcher.asciidoc[] +include::{es-repo-dir}/watcher/apis/watcher-api.asciidoc[] include::defs.asciidoc[] diff --git a/x-pack/docs/en/watcher/actions.asciidoc b/docs/reference/watcher/actions.asciidoc similarity index 94% rename from x-pack/docs/en/watcher/actions.asciidoc rename to docs/reference/watcher/actions.asciidoc index de2516b0589cc..7113711b99a96 100644 --- a/x-pack/docs/en/watcher/actions.asciidoc +++ b/docs/reference/watcher/actions.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="gold"] [[actions]] == Actions @@ -91,6 +93,7 @@ PUT _xpack/watcher/watch/error_logs_alert } -------------------------------------------------- // CONSOLE +// TEST[skip:non-compliant license] <1> There will be at least 15 minutes between subsequent `email_administrator` action executions. <2> See <> for more information. @@ -150,6 +153,7 @@ PUT _xpack/watcher/watch/log_event_watch } -------------------------------------------------- // CONSOLE +// TEST[skip:skip:non-compliant license] <1> There will be at least 15 minutes between subsequent action executions (applies to both `email_administrator` and `notify_pager` actions) @@ -255,32 +259,33 @@ PUT _xpack/watcher/watch/log_event_watch } -------------------------------------------------- // CONSOLE +// TEST[skip:non-compliant license] <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). -:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/watcher/actions/email.asciidoc +:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/docs/reference/watcher/actions/email.asciidoc include::actions/email.asciidoc[] -:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/watcher/actions/webhook.asciidoc +:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/docs/reference/watcher/actions/webhook.asciidoc include::actions/webhook.asciidoc[] -:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/watcher/actions/index.asciidoc +:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/docs/reference/watcher/actions/index.asciidoc include::actions/index.asciidoc[] -:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/watcher/actions/logging.asciidoc +:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/docs/reference/watcher/actions/logging.asciidoc include::actions/logging.asciidoc[] -:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/watcher/actions/hipchat.asciidoc +:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/docs/reference/watcher/actions/hipchat.asciidoc include::actions/hipchat.asciidoc[] -:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/watcher/actions/slack.asciidoc +:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/docs/reference/watcher/actions/slack.asciidoc include::actions/slack.asciidoc[] -:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/watcher/actions/pagerduty.asciidoc +:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/docs/reference/watcher/actions/pagerduty.asciidoc include::actions/pagerduty.asciidoc[] -:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/watcher/actions/jira.asciidoc +:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/docs/reference/watcher/actions/jira.asciidoc include::actions/jira.asciidoc[] [float] diff --git a/x-pack/docs/en/watcher/actions/email.asciidoc b/docs/reference/watcher/actions/email.asciidoc similarity index 99% rename from x-pack/docs/en/watcher/actions/email.asciidoc rename to docs/reference/watcher/actions/email.asciidoc index 0da028fcc7b1e..69cded133ac84 100644 --- a/x-pack/docs/en/watcher/actions/email.asciidoc +++ b/docs/reference/watcher/actions/email.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="gold"] [[actions-email]] === Email Action diff --git a/x-pack/docs/en/watcher/actions/hipchat.asciidoc b/docs/reference/watcher/actions/hipchat.asciidoc similarity index 99% rename from x-pack/docs/en/watcher/actions/hipchat.asciidoc rename to docs/reference/watcher/actions/hipchat.asciidoc index da5b7558c4a58..51dd78e9457fa 100644 --- a/x-pack/docs/en/watcher/actions/hipchat.asciidoc +++ b/docs/reference/watcher/actions/hipchat.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="gold"] [[actions-hipchat]] === HipChat Action diff --git a/x-pack/docs/en/watcher/actions/index.asciidoc b/docs/reference/watcher/actions/index.asciidoc similarity index 98% rename from x-pack/docs/en/watcher/actions/index.asciidoc rename to docs/reference/watcher/actions/index.asciidoc index 8a31b150f22cb..b14825fee115d 100644 --- a/x-pack/docs/en/watcher/actions/index.asciidoc +++ b/docs/reference/watcher/actions/index.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="gold"] [[actions-index]] === Index Action diff --git a/x-pack/docs/en/watcher/actions/jira.asciidoc b/docs/reference/watcher/actions/jira.asciidoc similarity index 99% rename from x-pack/docs/en/watcher/actions/jira.asciidoc rename to docs/reference/watcher/actions/jira.asciidoc index dc1afdc93b342..6ea805a7c915c 100644 --- a/x-pack/docs/en/watcher/actions/jira.asciidoc +++ b/docs/reference/watcher/actions/jira.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="gold"] [[actions-jira]] === Jira Action diff --git a/x-pack/docs/en/watcher/actions/logging.asciidoc b/docs/reference/watcher/actions/logging.asciidoc similarity index 98% rename from x-pack/docs/en/watcher/actions/logging.asciidoc rename to docs/reference/watcher/actions/logging.asciidoc index a8a4454c377eb..9cb66ff0db908 100644 --- a/x-pack/docs/en/watcher/actions/logging.asciidoc +++ b/docs/reference/watcher/actions/logging.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="gold"] [[actions-logging]] === Logging Action diff --git a/x-pack/docs/en/watcher/actions/pagerduty.asciidoc b/docs/reference/watcher/actions/pagerduty.asciidoc similarity index 99% rename from x-pack/docs/en/watcher/actions/pagerduty.asciidoc rename to docs/reference/watcher/actions/pagerduty.asciidoc index 1b93a0f219c6d..01ed539136be3 100644 --- a/x-pack/docs/en/watcher/actions/pagerduty.asciidoc +++ b/docs/reference/watcher/actions/pagerduty.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="gold"] [[actions-pagerduty]] === PagerDuty Action diff --git a/x-pack/docs/en/watcher/actions/slack.asciidoc b/docs/reference/watcher/actions/slack.asciidoc similarity index 99% rename from x-pack/docs/en/watcher/actions/slack.asciidoc rename to docs/reference/watcher/actions/slack.asciidoc index 0d0f77a4a3062..dc6ba549704eb 100644 --- a/x-pack/docs/en/watcher/actions/slack.asciidoc +++ b/docs/reference/watcher/actions/slack.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="gold"] [[actions-slack]] === Slack Action diff --git a/x-pack/docs/en/watcher/actions/webhook.asciidoc b/docs/reference/watcher/actions/webhook.asciidoc similarity index 99% rename from x-pack/docs/en/watcher/actions/webhook.asciidoc rename to docs/reference/watcher/actions/webhook.asciidoc index aabfb17f3b6e5..4b9cfd2b0e33d 100644 --- a/x-pack/docs/en/watcher/actions/webhook.asciidoc +++ b/docs/reference/watcher/actions/webhook.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="gold"] [[actions-webhook]] === Webhook Action diff --git a/x-pack/docs/en/rest-api/watcher/ack-watch.asciidoc b/docs/reference/watcher/apis/ack-watch.asciidoc similarity index 97% rename from x-pack/docs/en/rest-api/watcher/ack-watch.asciidoc rename to docs/reference/watcher/apis/ack-watch.asciidoc index f599f9f14459d..6c1ad888a7875 100644 --- a/x-pack/docs/en/rest-api/watcher/ack-watch.asciidoc +++ b/docs/reference/watcher/apis/ack-watch.asciidoc @@ -1,4 +1,5 @@ [role="xpack"] +[testenv="gold"] [[watcher-api-ack-watch]] === Ack Watch API @@ -83,6 +84,7 @@ watch definition when you call the <>: GET _xpack/watcher/watch/my_watch -------------------------------------------------- // CONSOLE +// TEST[skip:non-compliant license] The action state of a newly-created watch is `awaits_successful_execution`: @@ -229,6 +231,7 @@ comma-separated list of action ids: POST _xpack/watcher/watch/my_watch/_ack/action1,action2 -------------------------------------------------- // CONSOLE +// TEST[skip:non-compliant license] To acknowledge all of the actions of a watch, simply omit the `actions` parameter: @@ -237,8 +240,13 @@ parameter: -------------------------------------------------- POST _xpack/watcher/watch/my_watch/_ack -------------------------------------------------- -// TEST[s/^/POST _xpack\/watcher\/watch\/my_watch\/_execute\n{ "record_execution" : true }\n/] // CONSOLE +// TEST[skip:non-compliant license] + +//// +//After testing is re-enabled: +// [s/^/POST _xpack\/watcher\/watch\/my_watch\/_execute\n{ "record_execution" : true }\n/] +//// The response looks like a get watch response, but only contains the status: diff --git a/x-pack/docs/en/rest-api/watcher/activate-watch.asciidoc b/docs/reference/watcher/apis/activate-watch.asciidoc similarity index 94% rename from x-pack/docs/en/rest-api/watcher/activate-watch.asciidoc rename to docs/reference/watcher/apis/activate-watch.asciidoc index e853998415e96..572cd939ff7f5 100644 --- a/x-pack/docs/en/rest-api/watcher/activate-watch.asciidoc +++ b/docs/reference/watcher/apis/activate-watch.asciidoc @@ -1,4 +1,5 @@ [role="xpack"] +[testenv="gold"] [[watcher-api-activate-watch]] === Activate Watch API @@ -34,7 +35,7 @@ call the <>: GET _xpack/watcher/watch/my_watch -------------------------------------------------- // CONSOLE -// TEST[setup:my_inactive_watch] +// TEST[skip:non-compliant license, setup my_inactive_watch] [source,js] -------------------------------------------------- @@ -65,7 +66,7 @@ You can activate the watch by executing the following API call: PUT _xpack/watcher/watch/my_watch/_activate -------------------------------------------------- // CONSOLE -// TEST[setup:my_inactive_watch] +// TEST[skip:non-compliant license, setup my_inactive_watch] The new state of the watch is returned as part of its overall status: diff --git a/x-pack/docs/en/rest-api/watcher/deactivate-watch.asciidoc b/docs/reference/watcher/apis/deactivate-watch.asciidoc similarity index 94% rename from x-pack/docs/en/rest-api/watcher/deactivate-watch.asciidoc rename to docs/reference/watcher/apis/deactivate-watch.asciidoc index ab5a7200907e1..e211191ba1c42 100644 --- a/x-pack/docs/en/rest-api/watcher/deactivate-watch.asciidoc +++ b/docs/reference/watcher/apis/deactivate-watch.asciidoc @@ -1,4 +1,5 @@ [role="xpack"] +[testenv="gold"] [[watcher-api-deactivate-watch]] === Deactivate Watch API @@ -33,7 +34,7 @@ call the <>: GET _xpack/watcher/watch/my_watch -------------------------------------------------- // CONSOLE -// TEST[setup:my_active_watch] +// TEST[skip:non-compliant license, setup my_active_watch] [source,js] -------------------------------------------------- @@ -64,7 +65,7 @@ You can deactivate the watch by executing the following API call: PUT _xpack/watcher/watch/my_watch/_deactivate -------------------------------------------------- // CONSOLE -// TEST[setup:my_active_watch] +// TEST[skip:non-compliant license, setup my_active_watch] The new state of the watch is returned as part of its overall status: diff --git a/x-pack/docs/en/rest-api/watcher/delete-watch.asciidoc b/docs/reference/watcher/apis/delete-watch.asciidoc similarity index 95% rename from x-pack/docs/en/rest-api/watcher/delete-watch.asciidoc rename to docs/reference/watcher/apis/delete-watch.asciidoc index bedc60897e723..6b62c6094f05a 100644 --- a/x-pack/docs/en/rest-api/watcher/delete-watch.asciidoc +++ b/docs/reference/watcher/apis/delete-watch.asciidoc @@ -1,4 +1,5 @@ [role="xpack"] +[testenv="gold"] [[watcher-api-delete-watch]] === Delete Watch API @@ -45,7 +46,7 @@ The following example deletes a watch with the `my-watch` id: DELETE _xpack/watcher/watch/my_watch -------------------------------------------------- // CONSOLE -// TEST[setup:my_active_watch] +// TEST[skip:non-compliant license, setup my_active_watch] Response: diff --git a/x-pack/docs/en/rest-api/watcher/execute-watch.asciidoc b/docs/reference/watcher/apis/execute-watch.asciidoc similarity index 97% rename from x-pack/docs/en/rest-api/watcher/execute-watch.asciidoc rename to docs/reference/watcher/apis/execute-watch.asciidoc index ec2c60c543bab..b3bc4b1dd267f 100644 --- a/x-pack/docs/en/rest-api/watcher/execute-watch.asciidoc +++ b/docs/reference/watcher/apis/execute-watch.asciidoc @@ -1,4 +1,5 @@ [role="xpack"] +[testenv="gold"] [[watcher-api-execute-watch]] === Execute Watch API @@ -140,7 +141,7 @@ The following example executes the `my_watch` watch: POST _xpack/watcher/watch/my_watch/_execute -------------------------------------------------- // CONSOLE -// TEST[setup:my_active_watch] +// TEST[skip:non-compliant license, setup my_active_watch] The following example shows a comprehensive example of executing the `my-watch` watch: @@ -163,7 +164,7 @@ POST _xpack/watcher/watch/my_watch/_execute } -------------------------------------------------- // CONSOLE -// TEST[setup:my_active_watch] +// TEST[skip:non-compliant license, setup my_active_watch] <1> The triggered and schedule times are provided. <2> The input as defined by the watch is ignored and instead the provided input is used as the execution payload. @@ -298,7 +299,7 @@ POST _xpack/watcher/watch/my_watch/_execute } -------------------------------------------------- // CONSOLE -// TEST[setup:my_active_watch] +// TEST[skip:non-compliant license, setup my_active_watch] You can also associate a single execution mode with all the actions in the watch using `_all` as the action id: @@ -313,7 +314,7 @@ POST _xpack/watcher/watch/my_watch/_execute } -------------------------------------------------- // CONSOLE -// TEST[setup:my_active_watch] +// TEST[skip:non-compliant license, setup my_active_watch] The following example shows how to execute a watch inline: @@ -349,6 +350,7 @@ POST _xpack/watcher/watch/_execute } -------------------------------------------------- // CONSOLE +// TEST[skip:non-compliant license] All other settings for this API still apply when inlining a watch. In the following snippet, while the inline watch defines a `compare` condition, @@ -387,3 +389,4 @@ POST _xpack/watcher/watch/_execute } -------------------------------------------------- // CONSOLE +// TEST[skip:non-compliant license] \ No newline at end of file diff --git a/x-pack/docs/en/rest-api/watcher/get-watch.asciidoc b/docs/reference/watcher/apis/get-watch.asciidoc similarity index 95% rename from x-pack/docs/en/rest-api/watcher/get-watch.asciidoc rename to docs/reference/watcher/apis/get-watch.asciidoc index ee224f648634d..96194264a7e5a 100644 --- a/x-pack/docs/en/rest-api/watcher/get-watch.asciidoc +++ b/docs/reference/watcher/apis/get-watch.asciidoc @@ -1,4 +1,5 @@ [role="xpack"] +[testenv="gold"] [[watcher-api-get-watch]] === Get Watch API @@ -32,7 +33,7 @@ The following example gets a watch with `my-watch` id: GET _xpack/watcher/watch/my_watch -------------------------------------------------- // CONSOLE -// TEST[setup:my_active_watch] +// TEST[skip:non-compliant license, setup my_active_watch] Response: diff --git a/x-pack/docs/en/rest-api/watcher/put-watch.asciidoc b/docs/reference/watcher/apis/put-watch.asciidoc similarity index 98% rename from x-pack/docs/en/rest-api/watcher/put-watch.asciidoc rename to docs/reference/watcher/apis/put-watch.asciidoc index 41c078a9c9e1a..80dad69e67300 100644 --- a/x-pack/docs/en/rest-api/watcher/put-watch.asciidoc +++ b/docs/reference/watcher/apis/put-watch.asciidoc @@ -1,4 +1,5 @@ [role="xpack"] +[testenv="gold"] [[watcher-api-put-watch]] === Put Watch API @@ -143,6 +144,7 @@ PUT _xpack/watcher/watch/my-watch } -------------------------------------------------- // CONSOLE +// TEST[skip:non-compliant license] 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 diff --git a/x-pack/docs/en/rest-api/watcher/start.asciidoc b/docs/reference/watcher/apis/start.asciidoc similarity index 97% rename from x-pack/docs/en/rest-api/watcher/start.asciidoc rename to docs/reference/watcher/apis/start.asciidoc index ffdec3326d5e0..59b171be7729d 100644 --- a/x-pack/docs/en/rest-api/watcher/start.asciidoc +++ b/docs/reference/watcher/apis/start.asciidoc @@ -1,4 +1,5 @@ [role="xpack"] +[testenv="gold"] [[watcher-api-start]] === Start API diff --git a/x-pack/docs/en/rest-api/watcher/stats.asciidoc b/docs/reference/watcher/apis/stats.asciidoc similarity index 99% rename from x-pack/docs/en/rest-api/watcher/stats.asciidoc rename to docs/reference/watcher/apis/stats.asciidoc index 38f8ede925e4b..f5ca9063bc4fb 100644 --- a/x-pack/docs/en/rest-api/watcher/stats.asciidoc +++ b/docs/reference/watcher/apis/stats.asciidoc @@ -1,4 +1,5 @@ [role="xpack"] +[testenv="gold"] [[watcher-api-stats]] === Stats API diff --git a/x-pack/docs/en/rest-api/watcher/stop.asciidoc b/docs/reference/watcher/apis/stop.asciidoc similarity index 97% rename from x-pack/docs/en/rest-api/watcher/stop.asciidoc rename to docs/reference/watcher/apis/stop.asciidoc index 11345c89cefbb..e638531c1b345 100644 --- a/x-pack/docs/en/rest-api/watcher/stop.asciidoc +++ b/docs/reference/watcher/apis/stop.asciidoc @@ -1,4 +1,5 @@ [role="xpack"] +[testenv="gold"] [[watcher-api-stop]] === Stop API diff --git a/docs/reference/watcher/apis/watcher-api.asciidoc b/docs/reference/watcher/apis/watcher-api.asciidoc new file mode 100644 index 0000000000000..d864a295da452 --- /dev/null +++ b/docs/reference/watcher/apis/watcher-api.asciidoc @@ -0,0 +1,26 @@ +[role="xpack"] +[testenv="gold"] +[[watcher-api]] +== Watcher APIs + +* <> +* <> +* <> +* <> +* <> +* <> +* <> +* <> +* <> +* <> + +include::put-watch.asciidoc[] +include::get-watch.asciidoc[] +include::delete-watch.asciidoc[] +include::execute-watch.asciidoc[] +include::ack-watch.asciidoc[] +include::activate-watch.asciidoc[] +include::deactivate-watch.asciidoc[] +include::stats.asciidoc[] +include::stop.asciidoc[] +include::start.asciidoc[] diff --git a/x-pack/docs/en/watcher/condition.asciidoc b/docs/reference/watcher/condition.asciidoc similarity index 86% rename from x-pack/docs/en/watcher/condition.asciidoc rename to docs/reference/watcher/condition.asciidoc index 01f55f9b6682a..bed2cfa5d10e3 100644 --- a/x-pack/docs/en/watcher/condition.asciidoc +++ b/docs/reference/watcher/condition.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="gold"] [[condition]] == Conditions @@ -28,17 +30,17 @@ conditions are met. In addition to the watch wide condition, you can also configure conditions per <>. -:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/watcher/condition/always.asciidoc +:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/docs/reference/watcher/condition/always.asciidoc include::condition/always.asciidoc[] -:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/watcher/condition/never.asciidoc +:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/docs/reference/watcher/condition/never.asciidoc include::condition/never.asciidoc[] -:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/watcher/condition/compare.asciidoc +:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/docs/reference/watcher/condition/compare.asciidoc include::condition/compare.asciidoc[] -:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/watcher/condition/array-compare.asciidoc +:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/docs/reference/watcher/condition/array-compare.asciidoc include::condition/array-compare.asciidoc[] -:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/watcher/condition/script.asciidoc +:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/docs/reference/watcher/condition/script.asciidoc include::condition/script.asciidoc[] diff --git a/x-pack/docs/en/watcher/condition/always.asciidoc b/docs/reference/watcher/condition/always.asciidoc similarity index 96% rename from x-pack/docs/en/watcher/condition/always.asciidoc rename to docs/reference/watcher/condition/always.asciidoc index c2eb37be52c8f..5cce961fad6ef 100644 --- a/x-pack/docs/en/watcher/condition/always.asciidoc +++ b/docs/reference/watcher/condition/always.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="gold"] [[condition-always]] === Always Condition diff --git a/x-pack/docs/en/watcher/condition/array-compare.asciidoc b/docs/reference/watcher/condition/array-compare.asciidoc similarity index 98% rename from x-pack/docs/en/watcher/condition/array-compare.asciidoc rename to docs/reference/watcher/condition/array-compare.asciidoc index b413690865e60..4a869bd5c50bb 100644 --- a/x-pack/docs/en/watcher/condition/array-compare.asciidoc +++ b/docs/reference/watcher/condition/array-compare.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="gold"] [[condition-array-compare]] === Array Compare Condition diff --git a/x-pack/docs/en/watcher/condition/compare.asciidoc b/docs/reference/watcher/condition/compare.asciidoc similarity index 99% rename from x-pack/docs/en/watcher/condition/compare.asciidoc rename to docs/reference/watcher/condition/compare.asciidoc index d58638e6fe472..9c511644face9 100644 --- a/x-pack/docs/en/watcher/condition/compare.asciidoc +++ b/docs/reference/watcher/condition/compare.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="gold"] [[condition-compare]] === Compare Condition diff --git a/x-pack/docs/en/watcher/condition/never.asciidoc b/docs/reference/watcher/condition/never.asciidoc similarity index 95% rename from x-pack/docs/en/watcher/condition/never.asciidoc rename to docs/reference/watcher/condition/never.asciidoc index b8cad0b8c04d5..f1efd770816b2 100644 --- a/x-pack/docs/en/watcher/condition/never.asciidoc +++ b/docs/reference/watcher/condition/never.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="gold"] [[condition-never]] === Never Condition diff --git a/x-pack/docs/en/watcher/condition/script.asciidoc b/docs/reference/watcher/condition/script.asciidoc similarity index 99% rename from x-pack/docs/en/watcher/condition/script.asciidoc rename to docs/reference/watcher/condition/script.asciidoc index ee6a9531bf7b3..264da107d3110 100644 --- a/x-pack/docs/en/watcher/condition/script.asciidoc +++ b/docs/reference/watcher/condition/script.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="gold"] [[condition-script]] === Script Condition diff --git a/x-pack/docs/en/watcher/customizing-watches.asciidoc b/docs/reference/watcher/customizing-watches.asciidoc similarity index 99% rename from x-pack/docs/en/watcher/customizing-watches.asciidoc rename to docs/reference/watcher/customizing-watches.asciidoc index fc45bc636bfc5..394fd4dd76e7d 100644 --- a/x-pack/docs/en/watcher/customizing-watches.asciidoc +++ b/docs/reference/watcher/customizing-watches.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="gold"] [[customizing-watches]] == Customizing Watches diff --git a/x-pack/docs/en/watcher/encrypting-data.asciidoc b/docs/reference/watcher/encrypting-data.asciidoc similarity index 98% rename from x-pack/docs/en/watcher/encrypting-data.asciidoc rename to docs/reference/watcher/encrypting-data.asciidoc index 9319c9f793870..8cf65ff827a21 100644 --- a/x-pack/docs/en/watcher/encrypting-data.asciidoc +++ b/docs/reference/watcher/encrypting-data.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="gold"] [[encrypting-data]] == Encrypting Sensitive Data in {watcher} diff --git a/x-pack/docs/en/watcher/example-watches.asciidoc b/docs/reference/watcher/example-watches.asciidoc similarity index 81% rename from x-pack/docs/en/watcher/example-watches.asciidoc rename to docs/reference/watcher/example-watches.asciidoc index 2a402b20261d7..4df3318b5bd59 100644 --- a/x-pack/docs/en/watcher/example-watches.asciidoc +++ b/docs/reference/watcher/example-watches.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="gold"] [[example-watches]] == Example Watches The following examples show how to set up watches to: @@ -9,8 +11,8 @@ For more example watches you can use as a starting point for building custom watches, see the https://github.com/elastic/examples/tree/master/Alerting[Example Watches] in the Elastic Examples repo. -:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/watcher/example-watches/example-watch-clusterstatus.asciidoc +:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/docs/reference/watcher/example-watches/example-watch-clusterstatus.asciidoc include::example-watches/example-watch-clusterstatus.asciidoc[] -:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/watcher/example-watches/example-watch-meetupdata.asciidoc +:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/docs/reference/watcher/example-watches/example-watch-meetupdata.asciidoc include::example-watches/example-watch-meetupdata.asciidoc[] diff --git a/x-pack/docs/en/watcher/example-watches/example-watch-clusterstatus.asciidoc b/docs/reference/watcher/example-watches/example-watch-clusterstatus.asciidoc similarity index 97% rename from x-pack/docs/en/watcher/example-watches/example-watch-clusterstatus.asciidoc rename to docs/reference/watcher/example-watches/example-watch-clusterstatus.asciidoc index 0add5d99ccd2a..ffa0f526af4f7 100644 --- a/x-pack/docs/en/watcher/example-watches/example-watch-clusterstatus.asciidoc +++ b/docs/reference/watcher/example-watches/example-watch-clusterstatus.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="gold"] [[watch-cluster-status]] === Watching the Status of an Elasticsearch Cluster @@ -32,6 +34,7 @@ PUT _xpack/watcher/watch/cluster_health_watch } -------------------------------------------------- // CONSOLE +// TEST[skip:non-compliant license] <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 <> @@ -69,6 +72,7 @@ PUT _xpack/watcher/watch/cluster_health_watch } -------------------------------------------------- // CONSOLE +// TEST[skip:non-compliant license] If you're using Security, then you'll also need to supply some authentication credentials as part of the watch configuration: @@ -97,6 +101,7 @@ PUT _xpack/watcher/watch/cluster_health_watch } -------------------------------------------------- // CONSOLE +// TEST[skip:non-compliant license] It would be a good idea to create a user with the minimum privileges required for use with such a watch configuration. @@ -156,6 +161,7 @@ PUT _xpack/watcher/watch/cluster_health_watch } -------------------------------------------------- // CONSOLE +// TEST[skip:non-compliant license] <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. @@ -222,6 +228,7 @@ PUT _xpack/watcher/watch/cluster_health_watch } -------------------------------------------------- // CONSOLE +// TEST[skip:non-compliant license] For {watcher} to send email, you must configure an email account in your `elasticsearch.yml` configuration file and restart Elasticsearch. To add an email diff --git a/x-pack/docs/en/watcher/example-watches/example-watch-meetupdata.asciidoc b/docs/reference/watcher/example-watches/example-watch-meetupdata.asciidoc similarity index 99% rename from x-pack/docs/en/watcher/example-watches/example-watch-meetupdata.asciidoc rename to docs/reference/watcher/example-watches/example-watch-meetupdata.asciidoc index d933a38d7d670..8b31dd8e40970 100644 --- a/x-pack/docs/en/watcher/example-watches/example-watch-meetupdata.asciidoc +++ b/docs/reference/watcher/example-watches/example-watch-meetupdata.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="gold"] [[watching-meetup-data]] === Watching Event Data @@ -289,6 +291,7 @@ PUT _xpack/watcher/watch/meetup } -------------------------------------------------- // CONSOLE +// TEST[skip:non-compliant license] <1> The email body can include Mustache templates to reference data in the watch payload. By default,it will be <> to block dangerous content. <2> Replace the `from` address with the email address you configured in `elasticsearch.yml`. diff --git a/x-pack/docs/en/watcher/example-watches/watching-time-series-data.asciidoc b/docs/reference/watcher/example-watches/watching-time-series-data.asciidoc similarity index 97% rename from x-pack/docs/en/watcher/example-watches/watching-time-series-data.asciidoc rename to docs/reference/watcher/example-watches/watching-time-series-data.asciidoc index c594687382b90..e57f6539b9262 100644 --- a/x-pack/docs/en/watcher/example-watches/watching-time-series-data.asciidoc +++ b/docs/reference/watcher/example-watches/watching-time-series-data.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="gold"] [[watching-time-series-data]] === Watching Time Series Data @@ -204,10 +206,15 @@ PUT _xpack/watcher/watch/rss_watch } -------------------------------------------------- // CONSOLE -// TEST[s/"id" : "threshold_hits"/"source": "return ctx.payload.hits.total > params.threshold"/] +// TEST[skip:non-compliant license] <1> Replace `@` with your email address to receive notifications. +//// +//After testing is re-enabled: +// [s/"id" : "threshold_hits"/"source": "return ctx.payload.hits.total > params.threshold"/] +//// + [TIP] ================================================= To execute a watch immediately (without waiting for the schedule to trigger), diff --git a/x-pack/docs/en/watcher/getting-started.asciidoc b/docs/reference/watcher/getting-started.asciidoc similarity index 98% rename from x-pack/docs/en/watcher/getting-started.asciidoc rename to docs/reference/watcher/getting-started.asciidoc index 41eb654bab30c..19de0033b76ae 100644 --- a/x-pack/docs/en/watcher/getting-started.asciidoc +++ b/docs/reference/watcher/getting-started.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="gold"] [[watcher-getting-started]] == Getting Started with {watcher} @@ -48,6 +50,7 @@ PUT _xpack/watcher/watch/log_error_watch } ------------------------------------------------------------ // CONSOLE +// TEST[skip:non-compliant license] <1> Schedules are typically configured to run less frequently. This example sets the interval to 10 seconds so you can easily see the watches being triggered. Since this watch runs so frequently, don't forget to <> @@ -107,6 +110,7 @@ PUT _xpack/watcher/watch/log_error_watch } -------------------------------------------------- // CONSOLE +// TEST[skip:non-compliant license] <1> The {xpack-ref}/condition-compare.html[compare] condition lets you easily compare against values in the execution context. @@ -193,6 +197,7 @@ PUT _xpack/watcher/watch/log_error_watch } -------------------------------------------------- // CONSOLE +// TEST[skip:non-compliant license] [float] [[log-delete]] diff --git a/x-pack/docs/en/watcher/gs-index.asciidoc b/docs/reference/watcher/gs-index.asciidoc similarity index 98% rename from x-pack/docs/en/watcher/gs-index.asciidoc rename to docs/reference/watcher/gs-index.asciidoc index e799adec40a34..063d7ff0d3bf0 100644 --- a/x-pack/docs/en/watcher/gs-index.asciidoc +++ b/docs/reference/watcher/gs-index.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="gold"] [[xpack-alerting]] = Alerting on Cluster and Index Events diff --git a/x-pack/docs/en/watcher/how-watcher-works.asciidoc b/docs/reference/watcher/how-watcher-works.asciidoc similarity index 99% rename from x-pack/docs/en/watcher/how-watcher-works.asciidoc rename to docs/reference/watcher/how-watcher-works.asciidoc index 2bd19c1a41e02..fcd22efa410b9 100644 --- a/x-pack/docs/en/watcher/how-watcher-works.asciidoc +++ b/docs/reference/watcher/how-watcher-works.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="gold"] [[how-watcher-works]] == How {watcher} Works @@ -111,6 +113,7 @@ PUT _xpack/watcher/watch/log_errors } -------------------------------------------------- // CONSOLE +// TEST[skip:non-compliant license] <1> Metadata - You can attach optional static metadata to a watch. <2> Trigger - This schedule trigger executes the watch every 5 minutes. <3> Input - This input searches for errors in the `log-events` index and diff --git a/x-pack/docs/en/watcher/images/action-throttling.jpg b/docs/reference/watcher/images/action-throttling.jpg similarity index 100% rename from x-pack/docs/en/watcher/images/action-throttling.jpg rename to docs/reference/watcher/images/action-throttling.jpg diff --git a/x-pack/docs/en/watcher/images/hipchat-copy-room-token.jpg b/docs/reference/watcher/images/hipchat-copy-room-token.jpg similarity index 100% rename from x-pack/docs/en/watcher/images/hipchat-copy-room-token.jpg rename to docs/reference/watcher/images/hipchat-copy-room-token.jpg diff --git a/x-pack/docs/en/watcher/images/hipchat-copy-user-token.jpg b/docs/reference/watcher/images/hipchat-copy-user-token.jpg similarity index 100% rename from x-pack/docs/en/watcher/images/hipchat-copy-user-token.jpg rename to docs/reference/watcher/images/hipchat-copy-user-token.jpg diff --git a/x-pack/docs/en/watcher/images/hipchat-copy-v1-token.jpg b/docs/reference/watcher/images/hipchat-copy-v1-token.jpg similarity index 100% rename from x-pack/docs/en/watcher/images/hipchat-copy-v1-token.jpg rename to docs/reference/watcher/images/hipchat-copy-v1-token.jpg diff --git a/x-pack/docs/en/watcher/images/hipchat-generate-room-token.jpg b/docs/reference/watcher/images/hipchat-generate-room-token.jpg similarity index 100% rename from x-pack/docs/en/watcher/images/hipchat-generate-room-token.jpg rename to docs/reference/watcher/images/hipchat-generate-room-token.jpg diff --git a/x-pack/docs/en/watcher/images/hipchat-generate-user-token.jpg b/docs/reference/watcher/images/hipchat-generate-user-token.jpg similarity index 100% rename from x-pack/docs/en/watcher/images/hipchat-generate-user-token.jpg rename to docs/reference/watcher/images/hipchat-generate-user-token.jpg diff --git a/x-pack/docs/en/watcher/images/hipchat-generate-v1-token.jpg b/docs/reference/watcher/images/hipchat-generate-v1-token.jpg similarity index 100% rename from x-pack/docs/en/watcher/images/hipchat-generate-v1-token.jpg rename to docs/reference/watcher/images/hipchat-generate-v1-token.jpg diff --git a/x-pack/docs/en/watcher/images/hipchat-integration-example.png b/docs/reference/watcher/images/hipchat-integration-example.png similarity index 100% rename from x-pack/docs/en/watcher/images/hipchat-integration-example.png rename to docs/reference/watcher/images/hipchat-integration-example.png diff --git a/x-pack/docs/en/watcher/images/pagerduty-integrations.jpg b/docs/reference/watcher/images/pagerduty-integrations.jpg similarity index 100% rename from x-pack/docs/en/watcher/images/pagerduty-integrations.jpg rename to docs/reference/watcher/images/pagerduty-integrations.jpg diff --git a/x-pack/docs/en/watcher/images/pagerduty-services.jpg b/docs/reference/watcher/images/pagerduty-services.jpg similarity index 100% rename from x-pack/docs/en/watcher/images/pagerduty-services.jpg rename to docs/reference/watcher/images/pagerduty-services.jpg diff --git a/x-pack/docs/en/watcher/images/slack-add-webhook-integration.jpg b/docs/reference/watcher/images/slack-add-webhook-integration.jpg similarity index 100% rename from x-pack/docs/en/watcher/images/slack-add-webhook-integration.jpg rename to docs/reference/watcher/images/slack-add-webhook-integration.jpg diff --git a/x-pack/docs/en/watcher/images/slack-copy-webhook-url.jpg b/docs/reference/watcher/images/slack-copy-webhook-url.jpg similarity index 100% rename from x-pack/docs/en/watcher/images/slack-copy-webhook-url.jpg rename to docs/reference/watcher/images/slack-copy-webhook-url.jpg diff --git a/x-pack/docs/en/watcher/images/watch-execution.jpg b/docs/reference/watcher/images/watch-execution.jpg similarity index 100% rename from x-pack/docs/en/watcher/images/watch-execution.jpg rename to docs/reference/watcher/images/watch-execution.jpg diff --git a/x-pack/docs/en/watcher/images/watcher-kibana-dashboard.png b/docs/reference/watcher/images/watcher-kibana-dashboard.png similarity index 100% rename from x-pack/docs/en/watcher/images/watcher-kibana-dashboard.png rename to docs/reference/watcher/images/watcher-kibana-dashboard.png diff --git a/x-pack/docs/en/watcher/images/watcher.graffle b/docs/reference/watcher/images/watcher.graffle similarity index 100% rename from x-pack/docs/en/watcher/images/watcher.graffle rename to docs/reference/watcher/images/watcher.graffle diff --git a/x-pack/docs/en/watcher/index.asciidoc b/docs/reference/watcher/index.asciidoc similarity index 87% rename from x-pack/docs/en/watcher/index.asciidoc rename to docs/reference/watcher/index.asciidoc index 2be3638971929..f4f72874a1bb3 100644 --- a/x-pack/docs/en/watcher/index.asciidoc +++ b/docs/reference/watcher/index.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="gold"] [[xpack-alerting]] = Alerting on Cluster and Index Events @@ -65,35 +67,35 @@ from the query, whether the condition was met, and what actions were taken. -- -:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/watcher/getting-started.asciidoc +:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/docs/reference/watcher/getting-started.asciidoc include::getting-started.asciidoc[] -:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/watcher/how-watcher-works.asciidoc +:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/docs/reference/watcher/how-watcher-works.asciidoc include::how-watcher-works.asciidoc[] -:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/watcher/encrypting-data.asciidoc +:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/docs/reference/watcher/encrypting-data.asciidoc include::encrypting-data.asciidoc[] -:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/watcher/input.asciidoc +:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/docs/reference/watcher/input.asciidoc include::input.asciidoc[] -:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/watcher/trigger.asciidoc +:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/docs/reference/watcher/trigger.asciidoc include::trigger.asciidoc[] -:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/watcher/condition.asciidoc +:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/docs/reference/watcher/condition.asciidoc include::condition.asciidoc[] -:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/watcher/actions.asciidoc +:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/docs/reference/watcher/actions.asciidoc include::actions.asciidoc[] -:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/watcher/transform.asciidoc +:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/docs/reference/watcher/transform.asciidoc include::transform.asciidoc[] -:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/watcher/java.asciidoc +:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/docs/reference/watcher/java.asciidoc include::java.asciidoc[] -:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/watcher/managing-watches.asciidoc +:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/docs/reference/watcher/managing-watches.asciidoc include::managing-watches.asciidoc[] -:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/watcher/example-watches.asciidoc +:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/docs/reference/watcher/example-watches.asciidoc include::example-watches.asciidoc[] diff --git a/x-pack/docs/en/watcher/input.asciidoc b/docs/reference/watcher/input.asciidoc similarity index 83% rename from x-pack/docs/en/watcher/input.asciidoc rename to docs/reference/watcher/input.asciidoc index 6dee849c735f9..9dd66630aea9e 100644 --- a/x-pack/docs/en/watcher/input.asciidoc +++ b/docs/reference/watcher/input.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="gold"] [[input]] == Inputs @@ -19,14 +21,14 @@ execution context. NOTE: If you don't define an input for a watch, an empty payload is loaded into the execution context. -:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/watcher/input/simple.asciidoc +:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/docs/reference/watcher/input/simple.asciidoc include::input/simple.asciidoc[] -:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/watcher/input/search.asciidoc +:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/docs/reference/watcher/input/search.asciidoc include::input/search.asciidoc[] -:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/watcher/input/http.asciidoc +:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/docs/reference/watcher/input/http.asciidoc include::input/http.asciidoc[] -:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/watcher/input/chain.asciidoc +:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/docs/reference/watcher/input/chain.asciidoc include::input/chain.asciidoc[] diff --git a/x-pack/docs/en/watcher/input/chain.asciidoc b/docs/reference/watcher/input/chain.asciidoc similarity index 98% rename from x-pack/docs/en/watcher/input/chain.asciidoc rename to docs/reference/watcher/input/chain.asciidoc index 9952773e7227a..65f021b3ddc0d 100644 --- a/x-pack/docs/en/watcher/input/chain.asciidoc +++ b/docs/reference/watcher/input/chain.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="gold"] [[input-chain]] === Chain Input diff --git a/x-pack/docs/en/watcher/input/http.asciidoc b/docs/reference/watcher/input/http.asciidoc similarity index 99% rename from x-pack/docs/en/watcher/input/http.asciidoc rename to docs/reference/watcher/input/http.asciidoc index 79d37d14a1bf4..1e59526c45234 100644 --- a/x-pack/docs/en/watcher/input/http.asciidoc +++ b/docs/reference/watcher/input/http.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="gold"] [[input-http]] === HTTP Input diff --git a/x-pack/docs/en/watcher/input/search.asciidoc b/docs/reference/watcher/input/search.asciidoc similarity index 99% rename from x-pack/docs/en/watcher/input/search.asciidoc rename to docs/reference/watcher/input/search.asciidoc index 7ce67bfc1dc2b..c3c3768705e47 100644 --- a/x-pack/docs/en/watcher/input/search.asciidoc +++ b/docs/reference/watcher/input/search.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="gold"] [[input-search]] === Search Input diff --git a/x-pack/docs/en/watcher/input/simple.asciidoc b/docs/reference/watcher/input/simple.asciidoc similarity index 97% rename from x-pack/docs/en/watcher/input/simple.asciidoc rename to docs/reference/watcher/input/simple.asciidoc index c756a4e5403e2..2d04165cdb67b 100644 --- a/x-pack/docs/en/watcher/input/simple.asciidoc +++ b/docs/reference/watcher/input/simple.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="gold"] [[input-simple]] === Simple Input diff --git a/x-pack/docs/en/watcher/java.asciidoc b/docs/reference/watcher/java.asciidoc similarity index 89% rename from x-pack/docs/en/watcher/java.asciidoc rename to docs/reference/watcher/java.asciidoc index e5cb6b54b0c65..6797e2c31a25e 100644 --- a/x-pack/docs/en/watcher/java.asciidoc +++ b/docs/reference/watcher/java.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="gold"] [[api-java]] == Java API @@ -101,29 +103,29 @@ XPackClient xpackClient = new XPackClient(client); WatcherClient watcherClient = xpackClient.watcher(); -------------------------------------------------- -:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/watcher/java/put-watch.asciidoc +:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/docs/reference/watcher/java/put-watch.asciidoc include::java/put-watch.asciidoc[] -:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/watcher/java/get-watch.asciidoc +:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/docs/reference/watcher/java/get-watch.asciidoc include::java/get-watch.asciidoc[] -:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/watcher/java/delete-watch.asciidoc +:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/docs/reference/watcher/java/delete-watch.asciidoc include::java/delete-watch.asciidoc[] -:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/watcher/java/execute-watch.asciidoc +:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/docs/reference/watcher/java/execute-watch.asciidoc include::java/execute-watch.asciidoc[] -:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/watcher/java/ack-watch.asciidoc +:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/docs/reference/watcher/java/ack-watch.asciidoc include::java/ack-watch.asciidoc[] -:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/watcher/java/activate-watch.asciidoc +:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/docs/reference/watcher/java/activate-watch.asciidoc include::java/activate-watch.asciidoc[] -:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/watcher/java/deactivate-watch.asciidoc +:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/docs/reference/watcher/java/deactivate-watch.asciidoc include::java/deactivate-watch.asciidoc[] -:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/watcher/java/stats.asciidoc +:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/docs/reference/watcher/java/stats.asciidoc include::java/stats.asciidoc[] -:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/watcher/java/service.asciidoc +:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/docs/reference/watcher/java/service.asciidoc include::java/service.asciidoc[] diff --git a/x-pack/docs/en/watcher/java/ack-watch.asciidoc b/docs/reference/watcher/java/ack-watch.asciidoc similarity index 100% rename from x-pack/docs/en/watcher/java/ack-watch.asciidoc rename to docs/reference/watcher/java/ack-watch.asciidoc diff --git a/x-pack/docs/en/watcher/java/activate-watch.asciidoc b/docs/reference/watcher/java/activate-watch.asciidoc similarity index 100% rename from x-pack/docs/en/watcher/java/activate-watch.asciidoc rename to docs/reference/watcher/java/activate-watch.asciidoc diff --git a/x-pack/docs/en/watcher/java/deactivate-watch.asciidoc b/docs/reference/watcher/java/deactivate-watch.asciidoc similarity index 100% rename from x-pack/docs/en/watcher/java/deactivate-watch.asciidoc rename to docs/reference/watcher/java/deactivate-watch.asciidoc diff --git a/x-pack/docs/en/watcher/java/delete-watch.asciidoc b/docs/reference/watcher/java/delete-watch.asciidoc similarity index 100% rename from x-pack/docs/en/watcher/java/delete-watch.asciidoc rename to docs/reference/watcher/java/delete-watch.asciidoc diff --git a/x-pack/docs/en/watcher/java/execute-watch.asciidoc b/docs/reference/watcher/java/execute-watch.asciidoc similarity index 100% rename from x-pack/docs/en/watcher/java/execute-watch.asciidoc rename to docs/reference/watcher/java/execute-watch.asciidoc diff --git a/x-pack/docs/en/watcher/java/get-watch.asciidoc b/docs/reference/watcher/java/get-watch.asciidoc similarity index 100% rename from x-pack/docs/en/watcher/java/get-watch.asciidoc rename to docs/reference/watcher/java/get-watch.asciidoc diff --git a/x-pack/docs/en/watcher/java/put-watch.asciidoc b/docs/reference/watcher/java/put-watch.asciidoc similarity index 100% rename from x-pack/docs/en/watcher/java/put-watch.asciidoc rename to docs/reference/watcher/java/put-watch.asciidoc diff --git a/x-pack/docs/en/watcher/java/service.asciidoc b/docs/reference/watcher/java/service.asciidoc similarity index 100% rename from x-pack/docs/en/watcher/java/service.asciidoc rename to docs/reference/watcher/java/service.asciidoc diff --git a/x-pack/docs/en/watcher/java/stats.asciidoc b/docs/reference/watcher/java/stats.asciidoc similarity index 100% rename from x-pack/docs/en/watcher/java/stats.asciidoc rename to docs/reference/watcher/java/stats.asciidoc diff --git a/x-pack/docs/en/watcher/managing-watches.asciidoc b/docs/reference/watcher/managing-watches.asciidoc similarity index 93% rename from x-pack/docs/en/watcher/managing-watches.asciidoc rename to docs/reference/watcher/managing-watches.asciidoc index a7598d1f0dadf..8913beb5a0321 100644 --- a/x-pack/docs/en/watcher/managing-watches.asciidoc +++ b/docs/reference/watcher/managing-watches.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="gold"] [[managing-watches]] == Managing Watches @@ -33,4 +35,4 @@ GET .watches/_search } -------------------------------------------------- // CONSOLE -// TEST[setup:my_active_watch] +// TEST[skip:non-compliant license, setup my_active_watch] diff --git a/x-pack/docs/en/watcher/release-notes.asciidoc b/docs/reference/watcher/release-notes.asciidoc similarity index 99% rename from x-pack/docs/en/watcher/release-notes.asciidoc rename to docs/reference/watcher/release-notes.asciidoc index 627c45829d3e2..8473647192874 100644 --- a/x-pack/docs/en/watcher/release-notes.asciidoc +++ b/docs/reference/watcher/release-notes.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="gold"] [[watcher-release-notes]] == Watcher Release Notes (Pre-5.0) diff --git a/x-pack/docs/en/watcher/transform.asciidoc b/docs/reference/watcher/transform.asciidoc similarity index 92% rename from x-pack/docs/en/watcher/transform.asciidoc rename to docs/reference/watcher/transform.asciidoc index 8241d7b0cb442..06932de943aa6 100644 --- a/x-pack/docs/en/watcher/transform.asciidoc +++ b/docs/reference/watcher/transform.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="gold"] [[transform]] == Transforms @@ -56,11 +58,11 @@ part of the definition of the `my_webhook` action. <1> A watch level `transform` <2> An action level `transform` -:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/watcher/transform/search.asciidoc +:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/docs/reference/watcher/transform/search.asciidoc include::transform/search.asciidoc[] -:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/watcher/transform/script.asciidoc +:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/docs/reference/watcher/transform/script.asciidoc include::transform/script.asciidoc[] -:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/watcher/transform/chain.asciidoc +:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/docs/reference/watcher/transform/chain.asciidoc include::transform/chain.asciidoc[] \ No newline at end of file diff --git a/x-pack/docs/en/watcher/transform/chain.asciidoc b/docs/reference/watcher/transform/chain.asciidoc similarity index 98% rename from x-pack/docs/en/watcher/transform/chain.asciidoc rename to docs/reference/watcher/transform/chain.asciidoc index 9ad27fe48ed81..d6aeef7687833 100644 --- a/x-pack/docs/en/watcher/transform/chain.asciidoc +++ b/docs/reference/watcher/transform/chain.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="gold"] [[transform-chain]] === Chain Transform diff --git a/x-pack/docs/en/watcher/transform/script.asciidoc b/docs/reference/watcher/transform/script.asciidoc similarity index 98% rename from x-pack/docs/en/watcher/transform/script.asciidoc rename to docs/reference/watcher/transform/script.asciidoc index f1a46d482d9e6..3da11314f81f7 100644 --- a/x-pack/docs/en/watcher/transform/script.asciidoc +++ b/docs/reference/watcher/transform/script.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="gold"] [[transform-script]] === Script Transform diff --git a/x-pack/docs/en/watcher/transform/search.asciidoc b/docs/reference/watcher/transform/search.asciidoc similarity index 99% rename from x-pack/docs/en/watcher/transform/search.asciidoc rename to docs/reference/watcher/transform/search.asciidoc index 56f9304d986ce..76d2a755966a5 100644 --- a/x-pack/docs/en/watcher/transform/search.asciidoc +++ b/docs/reference/watcher/transform/search.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="gold"] [[transform-search]] === Search Transform diff --git a/x-pack/docs/en/watcher/trigger.asciidoc b/docs/reference/watcher/trigger.asciidoc similarity index 87% rename from x-pack/docs/en/watcher/trigger.asciidoc rename to docs/reference/watcher/trigger.asciidoc index af830e829a45e..9b97fd9c8c5e8 100644 --- a/x-pack/docs/en/watcher/trigger.asciidoc +++ b/docs/reference/watcher/trigger.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="gold"] [[trigger]] == Triggers @@ -9,5 +11,5 @@ the trigger and triggering the watch when needed. {watcher} is designed to support different types of triggers, but only time-based <> triggers are currently available. -:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/watcher/trigger/schedule.asciidoc +:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/docs/reference/watcher/trigger/schedule.asciidoc include::trigger/schedule.asciidoc[] diff --git a/x-pack/docs/en/watcher/trigger/schedule.asciidoc b/docs/reference/watcher/trigger/schedule.asciidoc similarity index 98% rename from x-pack/docs/en/watcher/trigger/schedule.asciidoc rename to docs/reference/watcher/trigger/schedule.asciidoc index abbc3f5cfe8e5..01a53cfd8ca6a 100644 --- a/x-pack/docs/en/watcher/trigger/schedule.asciidoc +++ b/docs/reference/watcher/trigger/schedule.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="gold"] [[trigger-schedule]] === Schedule Trigger diff --git a/x-pack/docs/en/watcher/trigger/schedule/cron.asciidoc b/docs/reference/watcher/trigger/schedule/cron.asciidoc similarity index 99% rename from x-pack/docs/en/watcher/trigger/schedule/cron.asciidoc rename to docs/reference/watcher/trigger/schedule/cron.asciidoc index 57a6ebdfd92ef..d5c49c5b9c31f 100644 --- a/x-pack/docs/en/watcher/trigger/schedule/cron.asciidoc +++ b/docs/reference/watcher/trigger/schedule/cron.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="gold"] [[schedule-cron]] ==== `cron` Schedule diff --git a/x-pack/docs/en/watcher/trigger/schedule/daily.asciidoc b/docs/reference/watcher/trigger/schedule/daily.asciidoc similarity index 98% rename from x-pack/docs/en/watcher/trigger/schedule/daily.asciidoc rename to docs/reference/watcher/trigger/schedule/daily.asciidoc index e729335d59b29..927c40848550c 100644 --- a/x-pack/docs/en/watcher/trigger/schedule/daily.asciidoc +++ b/docs/reference/watcher/trigger/schedule/daily.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="gold"] [[schedule-daily]] ==== Daily Schedule diff --git a/x-pack/docs/en/watcher/trigger/schedule/hourly.asciidoc b/docs/reference/watcher/trigger/schedule/hourly.asciidoc similarity index 97% rename from x-pack/docs/en/watcher/trigger/schedule/hourly.asciidoc rename to docs/reference/watcher/trigger/schedule/hourly.asciidoc index 9ec750eebcd2b..05e8b824ed10d 100644 --- a/x-pack/docs/en/watcher/trigger/schedule/hourly.asciidoc +++ b/docs/reference/watcher/trigger/schedule/hourly.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="gold"] [[schedule-hourly]] ==== Hourly Schedule diff --git a/x-pack/docs/en/watcher/trigger/schedule/interval.asciidoc b/docs/reference/watcher/trigger/schedule/interval.asciidoc similarity index 97% rename from x-pack/docs/en/watcher/trigger/schedule/interval.asciidoc rename to docs/reference/watcher/trigger/schedule/interval.asciidoc index e534181ec0c2f..62b83ec74dc55 100644 --- a/x-pack/docs/en/watcher/trigger/schedule/interval.asciidoc +++ b/docs/reference/watcher/trigger/schedule/interval.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="gold"] [[schedule-interval]] ==== Interval Schedule diff --git a/x-pack/docs/en/watcher/trigger/schedule/monthly.asciidoc b/docs/reference/watcher/trigger/schedule/monthly.asciidoc similarity index 98% rename from x-pack/docs/en/watcher/trigger/schedule/monthly.asciidoc rename to docs/reference/watcher/trigger/schedule/monthly.asciidoc index d2cfe409992a7..38047440e58fc 100644 --- a/x-pack/docs/en/watcher/trigger/schedule/monthly.asciidoc +++ b/docs/reference/watcher/trigger/schedule/monthly.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="gold"] [[schedule-monthly]] ==== Monthly Schedule diff --git a/x-pack/docs/en/watcher/trigger/schedule/weekly.asciidoc b/docs/reference/watcher/trigger/schedule/weekly.asciidoc similarity index 98% rename from x-pack/docs/en/watcher/trigger/schedule/weekly.asciidoc rename to docs/reference/watcher/trigger/schedule/weekly.asciidoc index d6a403cb125c6..2a4b6d9a2c2d3 100644 --- a/x-pack/docs/en/watcher/trigger/schedule/weekly.asciidoc +++ b/docs/reference/watcher/trigger/schedule/weekly.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="gold"] [[schedule-weekly]] ==== Weekly Schedule diff --git a/x-pack/docs/en/watcher/trigger/schedule/yearly.asciidoc b/docs/reference/watcher/trigger/schedule/yearly.asciidoc similarity index 98% rename from x-pack/docs/en/watcher/trigger/schedule/yearly.asciidoc rename to docs/reference/watcher/trigger/schedule/yearly.asciidoc index d11cc5d072787..fdbfe7b1b55f9 100644 --- a/x-pack/docs/en/watcher/trigger/schedule/yearly.asciidoc +++ b/docs/reference/watcher/trigger/schedule/yearly.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="gold"] [[schedule-yearly]] ==== Yearly Schedule diff --git a/x-pack/docs/build.gradle b/x-pack/docs/build.gradle index f027493b0abed..cdf2269d33bfc 100644 --- a/x-pack/docs/build.gradle +++ b/x-pack/docs/build.gradle @@ -9,13 +9,10 @@ apply plugin: 'elasticsearch.docs-test' * only remove entries from this list. When it is empty we'll remove it * entirely and have a party! There will be cake and everything.... */ buildRestTests.expectedUnconvertedCandidates = [ - 'en/rest-api/watcher/put-watch.asciidoc', 'en/security/authentication/user-cache.asciidoc', 'en/security/authorization/run-as-privilege.asciidoc', 'en/security/ccs-clients-integrations/http.asciidoc', 'en/security/authorization/custom-roles-provider.asciidoc', - 'en/rest-api/watcher/stats.asciidoc', - 'en/watcher/example-watches/watching-time-series-data.asciidoc', ] dependencies { @@ -91,7 +88,6 @@ buildRestTests.docs = fileTree(projectDir) { // That is where the snippets go, not where they come from! exclude 'build' // These file simply doesn't pass yet. We should figure out how to fix them. - exclude 'en/watcher/reference/actions.asciidoc' exclude 'en/rest-api/graph/explore.asciidoc' } diff --git a/x-pack/docs/en/rest-api/watcher.asciidoc b/x-pack/docs/en/rest-api/watcher.asciidoc deleted file mode 100644 index 2fcb9b9ca190b..0000000000000 --- a/x-pack/docs/en/rest-api/watcher.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -[role="xpack"] -[[watcher-api]] -== Watcher APIs - -* <> -* <> -* <> -* <> -* <> -* <> -* <> -* <> -* <> -* <> - -include::watcher/put-watch.asciidoc[] -include::watcher/get-watch.asciidoc[] -include::watcher/delete-watch.asciidoc[] -include::watcher/execute-watch.asciidoc[] -include::watcher/ack-watch.asciidoc[] -include::watcher/activate-watch.asciidoc[] -include::watcher/deactivate-watch.asciidoc[] -include::watcher/stats.asciidoc[] -include::watcher/stop.asciidoc[] -include::watcher/start.asciidoc[]