How to create ISM policy and rotate logs in opensearch
{ "id": "k8s_ingress-nginx", "policy": { "policy_id": "k8s_ingress-nginx", "description": "Move indices into a cold state after 30 days and delete them after a year.", "default_state": "hot", "states": [ { "name": "hot", "actions": [ { "replica_count": { "number_of_replicas": 1 } } ], "transitions": [ { "state_name": "cold", "conditions": { "min_index_age": "3d" } } ] }, { "name": "cold", "transitions": [ { "state_name": "delete", "conditions": { "min_index_age": "5d" } } ] }, { "name": "delete", "actions": [ { "delete": {} } ], "transitions": [] } ], "ism_template": [ { "index_patterns": [ "k8s_ingress-nginx*" ], "priority": 100 } ] } }
Comments
Post a Comment