From 369941ba50e399ce4409277bf95bbb01e2821fa0 Mon Sep 17 00:00:00 2001 From: James Rodewig Date: Thu, 15 Aug 2019 08:57:28 -0400 Subject: [PATCH 1/3] [DOCS] Document `throttle_period_in_millis` for watcher actions Closes #45346. --- x-pack/docs/en/rest-api/watcher/put-watch.asciidoc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/x-pack/docs/en/rest-api/watcher/put-watch.asciidoc b/x-pack/docs/en/rest-api/watcher/put-watch.asciidoc index 1349e8def05d9..f8e5d3fb9db1c 100644 --- a/x-pack/docs/en/rest-api/watcher/put-watch.asciidoc +++ b/x-pack/docs/en/rest-api/watcher/put-watch.asciidoc @@ -68,7 +68,15 @@ A watch has the following fields: | `throttle_period` | The minimum time between actions being run, the default for this is 5 seconds. This default can be changed in the - config file with the setting `xpack.watcher.throttle.period.default_period`. + config file with the setting + `xpack.watcher.throttle.period.default_period`. If + provided, the `throttle_period_in_millis` value overrides + this parameter. + +| `throttle_period_in_millis` | Minimum time in milliseconds between actions + being run. Defaults to `5000`. If provided, this + value overrides the `throttle_period` value. + |====== [float] From cfe41d9cb17ef082fe8f314779ad5f9402bafa93 Mon Sep 17 00:00:00 2001 From: James Rodewig Date: Fri, 16 Aug 2019 14:40:10 -0400 Subject: [PATCH 2/3] Reverse override statements --- x-pack/docs/en/rest-api/watcher/put-watch.asciidoc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/x-pack/docs/en/rest-api/watcher/put-watch.asciidoc b/x-pack/docs/en/rest-api/watcher/put-watch.asciidoc index f8e5d3fb9db1c..e93fc32c96388 100644 --- a/x-pack/docs/en/rest-api/watcher/put-watch.asciidoc +++ b/x-pack/docs/en/rest-api/watcher/put-watch.asciidoc @@ -70,12 +70,13 @@ A watch has the following fields: for this is 5 seconds. This default can be changed in the config file with the setting `xpack.watcher.throttle.period.default_period`. If - provided, the `throttle_period_in_millis` value overrides - this parameter. + provided, this value overrides the + `throttle_period_in_millis` value. | `throttle_period_in_millis` | Minimum time in milliseconds between actions - being run. Defaults to `5000`. If provided, this - value overrides the `throttle_period` value. + being run. Defaults to `5000`. If provided, the + `throttle_period`` value overrides this + parameter. |====== From deaef45ab4202c50b15d6acac4abfaa036ecb119 Mon Sep 17 00:00:00 2001 From: James Rodewig Date: Fri, 16 Aug 2019 15:11:06 -0400 Subject: [PATCH 3/3] Correct override based on request order --- x-pack/docs/en/rest-api/watcher/put-watch.asciidoc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/x-pack/docs/en/rest-api/watcher/put-watch.asciidoc b/x-pack/docs/en/rest-api/watcher/put-watch.asciidoc index e93fc32c96388..a824afb49b274 100644 --- a/x-pack/docs/en/rest-api/watcher/put-watch.asciidoc +++ b/x-pack/docs/en/rest-api/watcher/put-watch.asciidoc @@ -69,14 +69,16 @@ A watch has the following fields: | `throttle_period` | The minimum time between actions being run, the default for this is 5 seconds. This default can be changed in the config file with the setting - `xpack.watcher.throttle.period.default_period`. If - provided, this value overrides the - `throttle_period_in_millis` value. + `xpack.watcher.throttle.period.default_period`. If both + this value and the `throttle_period_in_millis` parameter + are specified, {watcher} uses the last parameter + included in the request. | `throttle_period_in_millis` | Minimum time in milliseconds between actions - being run. Defaults to `5000`. If provided, the - `throttle_period`` value overrides this - parameter. + being run. Defaults to `5000`. If both this + value and the `throttle_period` parameter are + specified, {watcher} uses the last parameter + included in the request. |======