policy-definitions.asciidoc 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792
  1. [role="xpack"]
  2. [testenv="basic"]
  3. [[ilm-policy-definition]]
  4. == Policy phases and actions
  5. There are four stages in the index lifecycle, in the order
  6. they are executed.
  7. [options="header"]
  8. |======
  9. | Name | Description
  10. | `hot` | The index is actively being written to
  11. | `warm` | The index is generally not being written to, but is still queried
  12. | `cold` | The index is no longer being updated and is seldom queried. The
  13. information still needs to be searchable, but it's okay if those queries are
  14. slower.
  15. | `delete` | The index is no longer needed and can safely be deleted
  16. |======
  17. Each of these stages is called a "phase". A policy does not need to configure
  18. each phase for an index. For example, one policy may define only the hot
  19. phase and the delete phase, while another may define all four phases.
  20. === Timing
  21. Indices enter phases based on a phase's `min_age` parameter.
  22. The index will not enter the phase until the index's age is older than that
  23. of the `min_age`. The parameter is configured using a time
  24. duration format (see <<time-units, Time Units>>).
  25. `min_age` defaults to zero seconds `0s` for each phase if not specified.
  26. [source,console]
  27. --------------------------------------------------
  28. PUT _ilm/policy/my_policy
  29. {
  30. "policy": {
  31. "phases": {
  32. "warm": {
  33. "min_age": "1d",
  34. "actions": {
  35. "allocate": {
  36. "number_of_replicas": 1
  37. }
  38. }
  39. },
  40. "delete": {
  41. "min_age": "30d",
  42. "actions": {
  43. "delete": {}
  44. }
  45. }
  46. }
  47. }
  48. }
  49. --------------------------------------------------
  50. The above example configures a policy that moves the index into the warm
  51. phase after one day. Until then, the index is in a waiting state. After
  52. moving into the warm phase, it will wait until 30 days have elapsed before
  53. moving to the delete phase and deleting the index.
  54. `min_age` is usually the time elapsed from the time the index is created, unless
  55. the `index.lifecycle.origination_date` index setting is configured, in which
  56. case the `min_age` will be the time elapsed since that specified date. If the
  57. index is rolled over, then `min_age` is the time elapsed from the time the
  58. index is rolled over. The intention here is to execute following phases and
  59. actions relative to when data was written last to a rolled over index.
  60. The previous phase's actions must complete before {ilm} will check `min_age` and
  61. transition into the next phase. By default, {ilm} checks for indices that meet
  62. policy criteria, like `min_age`, every 10 minutes. You can use the
  63. `indices.lifecycle.poll_interval` cluster setting to control how often this
  64. check occurs.
  65. === Phase Execution
  66. The current phase definition, of an index's policy being executed, is stored
  67. in the index's metadata. This phase definition is cached to prevent changes to
  68. the policy from putting the index in a state where it cannot proceed from its
  69. current step. When the policy is updated we check to see if this phase
  70. definition can be safely updated, and if so, update the cached definition in
  71. indices using the updated policy. The phase and its actions are compiled into a
  72. series of discrete steps that are executed sequentially. Since some {ilm-init}
  73. actions are more complex and involve multiple operations against an index, each
  74. of these operations are done in isolation in a unit called a "step". The
  75. <<ilm-explain-lifecycle,Explain Lifecycle API>> exposes this information to us
  76. to see which step our index is either to execute next, or is currently
  77. executing.
  78. === Actions
  79. The below list shows the actions which are available in each phase.
  80. NOTE: The order that configured actions are performed in within each phase is
  81. determined automatically by {ilm-init}, and cannot be changed by changing the
  82. policy definition.
  83. * Hot
  84. - <<ilm-set-priority-action,Set Priority>>
  85. - <<ilm-unfollow-action,Unfollow>>
  86. - <<ilm-rollover-action,Rollover>>
  87. * Warm
  88. - <<ilm-set-priority-action,Set Priority>>
  89. - <<ilm-unfollow-action,Unfollow>>
  90. - <<ilm-readonly-action,Read-Only>>
  91. - <<ilm-allocate-action,Allocate>>
  92. - <<ilm-shrink-action,Shrink>>
  93. - <<ilm-forcemerge-action,Force Merge>>
  94. * Cold
  95. - <<ilm-set-priority-action,Set Priority>>
  96. - <<ilm-unfollow-action,Unfollow>>
  97. - <<ilm-allocate-action,Allocate>>
  98. - <<ilm-freeze-action,Freeze>>
  99. * Delete
  100. - <<ilm-delete-action,Wait For Snapshot>>
  101. - <<ilm-delete-action,Delete>>
  102. [[ilm-allocate-action]]
  103. ==== Allocate
  104. Phases allowed: warm, cold.
  105. The Allocate action allows you to specify which nodes are allowed to host the
  106. shards of the index and set the number of replicas.
  107. Behind the scenes, it is modifying the index settings
  108. for shard filtering and/or replica counts. When updating the number of replicas,
  109. configuring allocation rules is optional. When configuring allocation rules,
  110. setting number of replicas is optional. Although this action can be treated as
  111. two separate index settings updates, both can be configured at once.
  112. For more information about how {es} uses replicas for scaling, see
  113. <<scalability>>. See <<shard-allocation-filtering>> for more information about
  114. controlling where Elasticsearch allocates shards of a particular index.
  115. --
  116. NOTE: As allocate action is not allowed in `hot` phase, the initial allocation for the index should be done manually or via index templates, as ILM won't take care of index allocation during `hot` phase.
  117. --
  118. [[ilm-allocate-options]]
  119. .Allocate Options
  120. [options="header"]
  121. |======
  122. | Name | Required | Default | Description
  123. | `number_of_replicas` | no | - | The number of replicas to
  124. assign to the index
  125. | `include` | no | - | assigns an index to nodes
  126. having at least _one_ of the attributes
  127. | `exclude` | no | - | assigns an index to nodes having
  128. _none_ of the attributes
  129. | `require` | no | - | assigns an index to nodes having
  130. _all_ of the attributes
  131. |======
  132. If `number_of_replicas` is not configured, then at least one of `include`,
  133. `exclude`, and `require` is required. An empty Allocate Action with no configuration
  134. is invalid.
  135. ===== Example: Change number of replicas
  136. In this example, the index's number of replicas is changed to `2`, while allocation
  137. rules are unchanged.
  138. [source,console]
  139. --------------------------------------------------
  140. PUT _ilm/policy/my_policy
  141. {
  142. "policy": {
  143. "phases": {
  144. "warm": {
  145. "actions": {
  146. "allocate" : {
  147. "number_of_replicas" : 2
  148. }
  149. }
  150. }
  151. }
  152. }
  153. }
  154. --------------------------------------------------
  155. ===== Example: Assign index to node with specific "box_type" attribute
  156. This example assigns the index to nodes with `box_type` attribute of "hot" or "warm".
  157. [source,console]
  158. --------------------------------------------------
  159. PUT _ilm/policy/my_policy
  160. {
  161. "policy": {
  162. "phases": {
  163. "warm": {
  164. "actions": {
  165. "allocate" : {
  166. "include" : {
  167. "box_type": "hot,warm"
  168. }
  169. }
  170. }
  171. }
  172. }
  173. }
  174. }
  175. --------------------------------------------------
  176. ===== Example: Assign index to a specific node and update replica settings
  177. This example updates the index to have one replica per shard and be allocated
  178. to nodes with a `box_type` attribute of "cold".
  179. [source,console]
  180. --------------------------------------------------
  181. PUT _ilm/policy/my_policy
  182. {
  183. "policy": {
  184. "phases": {
  185. "warm": {
  186. "actions": {
  187. "allocate" : {
  188. "number_of_replicas": 1,
  189. "require" : {
  190. "box_type": "cold"
  191. }
  192. }
  193. }
  194. }
  195. }
  196. }
  197. }
  198. --------------------------------------------------
  199. [[ilm-wait-for-snapshot-action]]
  200. ==== Wait For Snapshot
  201. Phases allowed: delete.
  202. The Wait For Snapshot Action waits for defined SLM policy to be executed to ensure that snapshot of index exists before
  203. deletion.
  204. [[ilm-wait-for-snapshot-options]]
  205. .Wait For Snapshot
  206. [options="header"]
  207. |======
  208. | Name | Required | Default | Description
  209. | `policy` | yes | - | SLM policy name that this action should wait for
  210. |======
  211. [source,console]
  212. --------------------------------------------------
  213. PUT _ilm/policy/my_policy
  214. {
  215. "policy": {
  216. "phases": {
  217. "delete": {
  218. "actions": {
  219. "wait_for_snapshot" : {
  220. "policy": "slm-policy-name"
  221. }
  222. }
  223. }
  224. }
  225. }
  226. }
  227. --------------------------------------------------
  228. [[ilm-delete-action]]
  229. ==== Delete
  230. Phases allowed: delete.
  231. The Delete Action does just that, it deletes the index.
  232. This action does not have any options associated with it.
  233. [source,console]
  234. --------------------------------------------------
  235. PUT _ilm/policy/my_policy
  236. {
  237. "policy": {
  238. "phases": {
  239. "delete": {
  240. "actions": {
  241. "delete" : { }
  242. }
  243. }
  244. }
  245. }
  246. }
  247. --------------------------------------------------
  248. [[ilm-forcemerge-action]]
  249. ==== Force Merge
  250. Phases allowed: hot, warm.
  251. NOTE: Index will be be made read-only when this action is run
  252. (see: <<dynamic-index-settings,index.blocks.write>>)
  253. NOTE: If the `forcemerge` action is used in the `hot` phase, the `rollover` action *must* be preset.
  254. ILM validates this predicate and will refuse a policy with a forcemerge in the hot phase without a
  255. rollover action.
  256. The Force Merge Action <<indices-forcemerge,force merges>> the index into at
  257. most a specific number of <<indices-segments,segments>>.
  258. [[ilm-forcemerge-options]]
  259. .Force Merge Options
  260. [options="header"]
  261. |======
  262. | Name | Required | Default | Description
  263. | `max_num_segments` | yes | - | The number of segments to merge to. To fully merge the index, set it to `1`
  264. | `codec` | no | - | Optional specification of the `best_compression` codec
  265. |======
  266. [WARNING]
  267. ======
  268. When using the `"codec": "best_compression"` configuration in the ILM forcemerge action, ILM will
  269. <<indices-close,close>> and then <<indices-open-close,re-open>> the index prior to a forcemerge.
  270. During this time the index will be unavailable for either read or write operations.
  271. ======
  272. [source,console]
  273. --------------------------------------------------
  274. PUT _ilm/policy/my_policy
  275. {
  276. "policy": {
  277. "phases": {
  278. "warm": {
  279. "actions": {
  280. "forcemerge" : {
  281. "max_num_segments": 1
  282. }
  283. }
  284. }
  285. }
  286. }
  287. }
  288. --------------------------------------------------
  289. [[ilm-freeze-action]]
  290. ==== Freeze
  291. Phases allowed: cold.
  292. This action will <<frozen-indices, freeze>> the index
  293. by calling the <<freeze-index-api, Freeze Index API>>.
  294. [source,console]
  295. --------------------------------------------------
  296. PUT _ilm/policy/my_policy
  297. {
  298. "policy": {
  299. "phases": {
  300. "cold": {
  301. "actions": {
  302. "freeze" : { }
  303. }
  304. }
  305. }
  306. }
  307. }
  308. --------------------------------------------------
  309. [IMPORTANT]
  310. ================================
  311. Freezing an index will close the index and reopen it within the same API call.
  312. This causes primaries to not be allocated for a short amount of time and
  313. causes the cluster to go red until the primaries are allocated again.
  314. This limitation might be removed in the future.
  315. ================================
  316. [[ilm-readonly-action]]
  317. ==== Read-Only
  318. Phases allowed: warm.
  319. This action will set the index to be read-only
  320. (see: <<dynamic-index-settings,index.blocks.write>>)
  321. This action does not have any options associated with it.
  322. [source,console]
  323. --------------------------------------------------
  324. PUT _ilm/policy/my_policy
  325. {
  326. "policy": {
  327. "phases": {
  328. "warm": {
  329. "actions": {
  330. "readonly" : { }
  331. }
  332. }
  333. }
  334. }
  335. }
  336. --------------------------------------------------
  337. [[ilm-rollover-action]]
  338. ==== Rollover
  339. Phases allowed: hot.
  340. [WARNING]
  341. index format must match pattern '^.*-\\d+$', for example (`logs-000001`).
  342. [WARNING]
  343. The managed index must set `index.lifecycle.rollover_alias` as the
  344. alias to rollover. The index must also be the write index for the alias.
  345. [IMPORTANT]
  346. If a policy using the Rollover action is used on a <<ccr-put-follow,follower
  347. index>>, policy execution will wait until the leader index rolls over (or has
  348. <<skipping-rollover, otherwise been marked as complete>>), then convert the
  349. follower index into a regular index as if <<ilm-unfollow-action,the Unfollow
  350. action>> had been used instead of rolling over.
  351. For example, if an index to be managed has an alias `my_data`. The managed
  352. index "my_index-000001" must be the write index for the alias. For more information, read
  353. <<indices-rollover-is-write-index,Write Index Alias Behavior>>.
  354. [source,console]
  355. --------------------------------------------------
  356. PUT my_index-000001
  357. {
  358. "settings": {
  359. "index.lifecycle.name": "my_policy",
  360. "index.lifecycle.rollover_alias": "my_data"
  361. },
  362. "aliases": {
  363. "my_data": {
  364. "is_write_index": true
  365. }
  366. }
  367. }
  368. --------------------------------------------------
  369. The Rollover Action rolls an alias over to a new index when the
  370. existing index meets one of the rollover conditions.
  371. [[ilm-rollover-options]]
  372. .Rollover Options
  373. [options="header"]
  374. |======
  375. | Name | Required | Default | Description
  376. | `max_size` | no | - | max primary shard index storage size.
  377. See <<byte-units, Byte Units>>
  378. for formatting
  379. | `max_docs` | no | - | max number of documents an
  380. index is to contain before
  381. rolling over.
  382. | `max_age` | no | - | max time elapsed from index
  383. creation. See
  384. <<time-units, Time Units>>
  385. for formatting
  386. |======
  387. At least one of `max_size`, `max_docs`, `max_age` or any combinations of the
  388. three are required to be specified.
  389. ===== Example: Rollover when index is too large
  390. This example rolls the index over when it is at least 100 gigabytes.
  391. [source,console]
  392. --------------------------------------------------
  393. PUT _ilm/policy/my_policy
  394. {
  395. "policy": {
  396. "phases": {
  397. "hot": {
  398. "actions": {
  399. "rollover" : {
  400. "max_size": "100GB"
  401. }
  402. }
  403. }
  404. }
  405. }
  406. }
  407. --------------------------------------------------
  408. ===== Example: Rollover when index has too many documents
  409. This example rolls the index over when it contains at least
  410. 100000000 documents.
  411. [source,console]
  412. --------------------------------------------------
  413. PUT _ilm/policy/my_policy
  414. {
  415. "policy": {
  416. "phases": {
  417. "hot": {
  418. "actions": {
  419. "rollover" : {
  420. "max_docs": 100000000
  421. }
  422. }
  423. }
  424. }
  425. }
  426. }
  427. --------------------------------------------------
  428. ===== Example: Rollover when index is too old
  429. This example rolls the index over when it has been created at least
  430. 7 days ago.
  431. [source,console]
  432. --------------------------------------------------
  433. PUT _ilm/policy/my_policy
  434. {
  435. "policy": {
  436. "phases": {
  437. "hot": {
  438. "actions": {
  439. "rollover" : {
  440. "max_age": "7d"
  441. }
  442. }
  443. }
  444. }
  445. }
  446. }
  447. --------------------------------------------------
  448. ===== Example: Rollover when index is too old or too large
  449. This example rolls the index over when it has been created at least
  450. 7 days ago or it is at least 100 gigabytes. In this case, the index will be
  451. rolled over when any of the conditions is met.
  452. [source,console]
  453. --------------------------------------------------
  454. PUT _ilm/policy/my_policy
  455. {
  456. "policy": {
  457. "phases": {
  458. "hot": {
  459. "actions": {
  460. "rollover" : {
  461. "max_age": "7d",
  462. "max_size": "100GB"
  463. }
  464. }
  465. }
  466. }
  467. }
  468. }
  469. --------------------------------------------------
  470. ===== Example: Rollover condition stalls phase transition
  471. The Rollover action will only complete once one of its conditions is
  472. met. This means that any proceeding phases will be blocked until Rollover
  473. succeeds.
  474. [source,console]
  475. --------------------------------------------------
  476. PUT /_ilm/policy/rollover_policy
  477. {
  478. "policy": {
  479. "phases": {
  480. "hot": {
  481. "actions": {
  482. "rollover": {
  483. "max_size": "50G"
  484. }
  485. }
  486. },
  487. "delete": {
  488. "min_age": "1d",
  489. "actions": {
  490. "delete": {}
  491. }
  492. }
  493. }
  494. }
  495. }
  496. --------------------------------------------------
  497. The above example illustrates a policy which attempts to delete an
  498. index one day after the index has been rolled over. It does not
  499. delete the index one day after it has been created.
  500. [[ilm-set-priority-action]]
  501. ==== Set Priority
  502. Phases allowed: hot, warm, cold.
  503. This action sets the <<recovery-prioritization, index priority>> on the index as
  504. soon as the policy enters the hot, warm, or cold phase. Indices with a higher
  505. priority will be recovered before indices with lower priorities following a node
  506. restart. Generally, indexes in the hot phase should have the highest value and
  507. indexes in the cold phase should have the lowest values. For example:
  508. 100 for the hot phase, 50 for the warm phase, and 0 for the cold phase.
  509. Indicies that don't set this value have an implicit default priority of 1.
  510. [[ilm-set-priority-options]]
  511. .Set Priority Options
  512. [options="header"]
  513. |======
  514. | Name | Required | Default | Description
  515. | `priority` | yes | - | The priority for the index. Must be 0 or greater.
  516. The value may also be set to null to remove the priority.
  517. |======
  518. [source,console]
  519. --------------------------------------------------
  520. PUT _ilm/policy/my_policy
  521. {
  522. "policy": {
  523. "phases": {
  524. "warm": {
  525. "actions": {
  526. "set_priority" : {
  527. "priority": 50
  528. }
  529. }
  530. }
  531. }
  532. }
  533. }
  534. --------------------------------------------------
  535. [[ilm-shrink-action]]
  536. ==== Shrink
  537. NOTE: Index will be be made read-only when this action is run
  538. (see: <<dynamic-index-settings,index.blocks.write>>)
  539. [IMPORTANT]
  540. If a policy using the Shrink action is used on a <<ccr-put-follow,follower
  541. index>>, policy execution will wait until the leader index rolls over (or has
  542. <<skipping-rollover, otherwise been marked as complete>>), then convert the
  543. follower index into a regular index as if <<ilm-unfollow-action,the Unfollow
  544. action>> had been used before shrink is applied, as shrink cannot be safely
  545. applied to follower indices.
  546. This action shrinks an existing index into a new index with fewer primary
  547. shards. It calls the <<indices-shrink-index,Shrink API>> to shrink the index.
  548. Since allocating all the primary shards of the index to one node is a
  549. prerequisite, this action will first allocate the primary shards to a valid
  550. node. After shrinking, it will swap aliases pointing to the original index
  551. into the new shrunken index. The new index will also have a new name:
  552. "shrink-<origin-index-name>". So if the original index was called "logs",
  553. then the new index will be named "shrink-logs".
  554. [[ilm-shrink-options]]
  555. .Shrink Options
  556. [options="header"]
  557. |======
  558. | Name | Required | Default | Description
  559. | `number_of_shards` | yes | - | The number of shards
  560. to shrink to. must be
  561. a factor of the number
  562. of shards in the
  563. source index.
  564. |======
  565. [source,console]
  566. --------------------------------------------------
  567. PUT _ilm/policy/my_policy
  568. {
  569. "policy": {
  570. "phases": {
  571. "warm": {
  572. "actions": {
  573. "shrink" : {
  574. "number_of_shards": 1
  575. }
  576. }
  577. }
  578. }
  579. }
  580. }
  581. --------------------------------------------------
  582. [[ilm-unfollow-action]]
  583. ==== Unfollow
  584. [IMPORTANT]
  585. This action may be used explicitly, as shown below, but this action is also run
  586. before <<ilm-rollover-action,the Rollover action>> and <<ilm-shrink-action,the
  587. Shrink action>> as described in the documentation for those actions. This is
  588. expected and safe for non-CCR indices to run, as the steps are skipped when CCR
  589. is not in use.
  590. This action turns a {ref}/ccr-apis.html[ccr] follower index
  591. into a regular index. This can be desired when moving follower
  592. indices into the next phase. Also certain actions like shrink
  593. and rollover can then be performed safely on follower indices.
  594. This action will wait until is it safe to convert a follower index into a
  595. regular index. In particular, the following conditions must be met:
  596. * The leader index must have `index.lifecycle.indexing_complete` set to `true`.
  597. This happens automatically if the leader index is rolled over using
  598. <<ilm-rollover-action,the Rollover action>>, or may be set manually using
  599. the <<indices-update-settings,Index Settings API>>.
  600. * All operations performed on the leader index must have been replicated to the
  601. follower index. This ensures that no operations will be lost when the index is
  602. converted into a regular index.
  603. If the unfollow action encounters a follower index then
  604. the following operations will be performed on it:
  605. * Pauses indexing following for the follower index.
  606. * Closes the follower index.
  607. * Unfollows the follower index.
  608. * Opens the follower index (which is at this point is a regular index).
  609. The unfollow action does not have any options and
  610. if it encounters a non follower index, then the
  611. unfollow action leaves that index untouched and
  612. lets the next action operate on this index.
  613. [source,console]
  614. --------------------------------------------------
  615. PUT _ilm/policy/my_policy
  616. {
  617. "policy": {
  618. "phases": {
  619. "hot": {
  620. "actions": {
  621. "unfollow" : {}
  622. }
  623. }
  624. }
  625. }
  626. }
  627. --------------------------------------------------
  628. === Full Policy
  629. With all of these actions, we can support complex management strategies for our
  630. indices. This policy will define an index that will start in the hot phase,
  631. rolling over every 50 GB or 7 days. After 30 days it enters the warm phase
  632. and increases the replicas to 2, force merges and shrinks. After 60 days
  633. it enters the cold phase and allocates to "cold" nodes, and after 90 days the
  634. index is deleted.
  635. [source,console]
  636. --------------------------------------------------
  637. PUT _ilm/policy/full_policy
  638. {
  639. "policy": {
  640. "phases": {
  641. "hot": {
  642. "actions": {
  643. "rollover": {
  644. "max_age": "7d",
  645. "max_size": "50G"
  646. }
  647. }
  648. },
  649. "warm": {
  650. "min_age": "30d",
  651. "actions": {
  652. "forcemerge": {
  653. "max_num_segments": 1
  654. },
  655. "shrink": {
  656. "number_of_shards": 1
  657. },
  658. "allocate": {
  659. "number_of_replicas": 2
  660. }
  661. }
  662. },
  663. "cold": {
  664. "min_age": "60d",
  665. "actions": {
  666. "allocate": {
  667. "require": {
  668. "type": "cold"
  669. }
  670. }
  671. }
  672. },
  673. "delete": {
  674. "min_age": "90d",
  675. "actions": {
  676. "delete": {}
  677. }
  678. }
  679. }
  680. }
  681. }
  682. --------------------------------------------------