diff --git a/x-pack/docs/en/ilm/index.asciidoc b/x-pack/docs/en/ilm/index.asciidoc index a0815d97c3a..74351dc45e8 100644 --- a/x-pack/docs/en/ilm/index.asciidoc +++ b/x-pack/docs/en/ilm/index.asciidoc @@ -63,7 +63,7 @@ include::update-lifecycle-policy.asciidoc[] include::get-index-lifecycle-information.asciidoc[] :edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/ilm/pause-resume-ilm.asciidoc -include::pause-resume-ilm.asciidoc[] +include::start-stop-ilm.asciidoc[] :edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/ilm/apis/ilm-api.asciidoc include::{xes-repo-dir}/ilm/apis/ilm-api.asciidoc[] diff --git a/x-pack/docs/en/ilm/pause-resume-ilm.asciidoc b/x-pack/docs/en/ilm/pause-resume-ilm.asciidoc deleted file mode 100644 index 37ba62e02cc..00000000000 --- a/x-pack/docs/en/ilm/pause-resume-ilm.asciidoc +++ /dev/null @@ -1,4 +0,0 @@ -[[pause-resume-ilm]] -== Pause and resume {ilm} -ILM can be skipped on a per-index basis -ILM as a whole can be placed in maintenance mode diff --git a/x-pack/docs/en/ilm/start-stop-ilm.asciidoc b/x-pack/docs/en/ilm/start-stop-ilm.asciidoc new file mode 100644 index 00000000000..9630b4f99ce --- /dev/null +++ b/x-pack/docs/en/ilm/start-stop-ilm.asciidoc @@ -0,0 +1,166 @@ +[[start-stop-ilm]] +== Start And Stop {ilm} + +All indices that are managed by ILM will continue to execute +their policies. There may be times when this is not desired on certain +indices, or maybe even all the indices in a cluster. For example, +maybe there are scheduled maintenance windows when cluster topology +changes are desired that may impact running ILM actions. For this reason, +ILM has two ways to disable operations. + +Normally, ILM will be running by default. +To see the current operating status of ILM, use the <> +to see the current state of ILM. + +//// +[source,js] +-------------------------------------------------- +PUT _ilm/my_policy +{ + "policy": { + "phases": { + "warm": { + "minimum_age": "10d", + "actions": { + "forcemerge": { + "max_num_segments": 1 + } + } + }, + "delete": { + "minimum_age": "30d", + "actions": { + "delete": {} + } + } + } + } +} + +PUT my_index +{ + "settings": { + "index.lifecycle.name": "my_policy" + } +} +-------------------------------------------------- +// CONSOLE +//// + +[source,js] +-------------------------------------------------- +GET _ilm/status +-------------------------------------------------- +// CONSOLE + +If the request does not encounter errors, you receive the following result: + +[source,js] +-------------------------------------------------- +{ + "operation_mode": "RUNNING" +} +-------------------------------------------------- +// CONSOLE +// TESTRESPONSE + +The operating modes of ILM: + + +.ILM Operating Modes +|=== +|Name |Description +|RUNNING |Normal operation where all policies are executed as normal +|STOPPING|ILM has received a request to stop but is still processing some policies +|STOPPED |This represents a state where no policies are executed +|=== + +=== Stopping ILM + +The ILM service can be paused such that no further steps will be executed +using the <>. + +[source,js] +-------------------------------------------------- +POST _ilm/stop +-------------------------------------------------- +// CONSOLE +// TEST[continued] + +When stopped, all further policy actions will be halted. This will +be reflected in the Status API + +//// +[source,js] +-------------------------------------------------- +GET _ilm/status +-------------------------------------------------- +// CONSOLE +// TEST[continued] +//// + +[source,js] +-------------------------------------------------- +{ + "operation_mode": "STOPPING" +} +-------------------------------------------------- +// CONSOLE +// TESTRESPONSE + +The ILM service will then, asynchronously, run all policies to a point +where it is safe to stop. After ILM verifies that it is safe, it will +move to the `STOPPED` mode. + +//// +[source,js] +-------------------------------------------------- +PUT trigger_ilm_cs_action + +GET _ilm/status +-------------------------------------------------- +// CONSOLE +// TEST[continued] +//// + +[source,js] +-------------------------------------------------- +{ + "operation_mode": "STOPPED" +} +-------------------------------------------------- +// CONSOLE +// TESTRESPONSE + +=== Starting ILM + +To start ILM and continue executing policies, use the <>. + + +[source,js] +-------------------------------------------------- +POST _ilm/start +-------------------------------------------------- +// CONSOLE +// TEST[continued] + +//// +[source,js] +-------------------------------------------------- +GET _ilm/status +-------------------------------------------------- +// CONSOLE +// TEST[continued] +//// + +The Start API will send a request to the ILM service to immediately begin +normal operations. + +[source,js] +-------------------------------------------------- +{ + "operation_mode": "RUNNING" +} +-------------------------------------------------- +// CONSOLE +// TESTRESPONSE