2018-10-16 15:18:54 -04:00
|
|
|
[role="xpack"]
|
|
|
|
[testenv="basic"]
|
|
|
|
[[ilm-start]]
|
2018-12-20 16:34:11 -05:00
|
|
|
=== Start {ilm} API
|
2019-04-30 13:46:13 -04:00
|
|
|
|
|
|
|
[subs="attributes"]
|
2018-10-16 15:18:54 -04:00
|
|
|
++++
|
2018-12-20 16:34:11 -05:00
|
|
|
<titleabbrev>Start {ilm}</titleabbrev>
|
2018-10-16 15:18:54 -04:00
|
|
|
++++
|
|
|
|
|
2018-12-20 16:34:11 -05:00
|
|
|
Start the {ilm} ({ilm-init}) plugin.
|
2018-10-16 15:18:54 -04:00
|
|
|
|
2019-11-20 11:19:33 -05:00
|
|
|
[[ilm-start-request]]
|
|
|
|
==== {api-request-title}
|
2018-10-16 15:18:54 -04:00
|
|
|
|
|
|
|
`POST /_ilm/start`
|
|
|
|
|
2019-11-20 11:19:33 -05:00
|
|
|
[[ilm-start-prereqs]]
|
|
|
|
==== {api-prereq-title}
|
|
|
|
|
|
|
|
* If the {es} {security-features} are enabled, you must have the `manage_ilm`
|
|
|
|
cluster privilege to use this API. For more information, see
|
|
|
|
<<security-privileges>>.
|
|
|
|
|
|
|
|
[[ilm-start-desc]]
|
|
|
|
==== {api-description-title}
|
2018-10-16 15:18:54 -04:00
|
|
|
|
2018-12-20 16:34:11 -05:00
|
|
|
Starts the {ilm-init} plugin if it is currently stopped. {ilm-init} is started
|
|
|
|
automatically when the cluster is formed. Restarting {ilm-init} is only
|
|
|
|
necessary if it has been stopped using the <<ilm-stop, Stop {ilm-init} API>>.
|
2018-10-16 15:18:54 -04:00
|
|
|
|
2019-11-20 11:19:33 -05:00
|
|
|
[[ilm-start-query-params]]
|
|
|
|
==== {api-query-parms-title}
|
2018-10-16 15:18:54 -04:00
|
|
|
|
2020-06-01 19:42:53 -04:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=timeoutparms]
|
2018-10-16 15:18:54 -04:00
|
|
|
|
2019-11-20 11:19:33 -05:00
|
|
|
[[ilm-start-example]]
|
|
|
|
==== {api-examples-title}
|
2018-10-16 15:18:54 -04:00
|
|
|
|
2020-04-28 19:38:01 -04:00
|
|
|
The following example starts the {ilm-init} plugin.
|
2018-10-16 15:18:54 -04:00
|
|
|
|
|
|
|
//////////////////////////
|
|
|
|
|
2019-09-09 13:38:14 -04:00
|
|
|
[source,console]
|
2018-10-16 15:18:54 -04:00
|
|
|
--------------------------------------------------
|
2018-10-30 19:19:05 -04:00
|
|
|
PUT _ilm/policy/my_policy
|
2018-10-16 15:18:54 -04:00
|
|
|
{
|
|
|
|
"policy": {
|
|
|
|
"phases": {
|
|
|
|
"warm": {
|
2018-10-30 15:54:02 -04:00
|
|
|
"min_age": "10d",
|
2018-10-16 15:18:54 -04:00
|
|
|
"actions": {
|
|
|
|
"forcemerge": {
|
|
|
|
"max_num_segments": 1
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"delete": {
|
2018-10-30 15:54:02 -04:00
|
|
|
"min_age": "30d",
|
2018-10-16 15:18:54 -04:00
|
|
|
"actions": {
|
|
|
|
"delete": {}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
PUT my_index
|
|
|
|
|
|
|
|
POST _ilm/stop
|
|
|
|
--------------------------------------------------
|
|
|
|
|
|
|
|
//////////////////////////
|
|
|
|
|
2019-09-09 13:38:14 -04:00
|
|
|
[source,console]
|
2018-10-16 15:18:54 -04:00
|
|
|
--------------------------------------------------
|
|
|
|
POST _ilm/start
|
|
|
|
--------------------------------------------------
|
|
|
|
// TEST[continued]
|
|
|
|
|
2018-11-08 18:26:27 -05:00
|
|
|
If the request succeeds, you receive the following result:
|
2018-10-16 15:18:54 -04:00
|
|
|
|
2019-09-06 09:22:08 -04:00
|
|
|
[source,console-result]
|
2018-10-16 15:18:54 -04:00
|
|
|
--------------------------------------------------
|
|
|
|
{
|
|
|
|
"acknowledged": true
|
|
|
|
}
|
|
|
|
--------------------------------------------------
|