Skip to content

Instantly share code, notes, and snippets.

@weyderfs
Created October 4, 2022 12:36
Show Gist options
  • Select an option

  • Save weyderfs/c6a02239dc5d165611c217a1232f80b5 to your computer and use it in GitHub Desktop.

Select an option

Save weyderfs/c6a02239dc5d165611c217a1232f80b5 to your computer and use it in GitHub Desktop.

Revisions

  1. Weyder Ferreira created this gist Oct 4, 2022.
    42 changes: 42 additions & 0 deletions elastic-ilm-policy-delete-after-8d.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,42 @@
    {
    "policy": {
    "description": "Delete index after 8D.",
    "default_state": "hot",
    "states": [
    {
    "name": "hot",
    "actions": [{
    "replica_count": {
    "number_of_replicas": 3
    }
    }
    ],
    "transitions": [
    {
    "state_name": "delete",
    "conditions": {
    "min_index_age": "8d"
    }
    }
    ]
    },
    {
    "name": "delete",
    "actions": [
    {
    "delete": {}
    }
    ],
    "transitions": []
    }
    ],
    "ism_template": [
    {
    "index_patterns": [
    "my-index-foo*"
    ],
    "priority": 0
    }
    ]
    }
    }