ow do I create an Elasticsearch Index Lifecycle Management (ILM) policy to limit the number of logstash-* or helix-* indices retained by the BMC Helix Logging system?
Excessive index retention can cause high disk usage and impact Elasticsearch cluster health. When disk usage reaches the high watermark threshold, Elasticsearch may relocate shards and generate warnings similar to the following:
If this warning appears in an EFK-related BMC Helix Logging pod, it indicates disk pressure. To avoid further impact, configure an Index Lifecycle Management policy to automatically manage index retention and limit the number of logstash-* or helix-* indices stored by the system.
|
Follow these steps to create an Elasticsearch Index Lifecycle Management policy and apply it to logstash-* or helix-* indices.
section of the product documentation.
Note: If your index uses a different naming pattern such as helix-*, replace the index patterns accordingly. For example, for indices named "logstash-*"): PUT _ilm/policy/BMC_logstash_cleanup { "policy": { "phases": { "hot": { "actions": { "set_priority": { "priority": 100 } }, "min_age": "0ms" }, "delete": { "min_age": "7d", "actions": { "delete": {} } } } } } PUT _index_template/logstash_index_template { "index_patterns": ["helix-*"], "template": { "settings": { "index.lifecycle.name": "BMC_logstash_cleanup", "index.lifecycle.rollover_alias": "logstash_ilm" } } } PUT helix-*/_settings { "index": { "lifecycle": { "name": "BMC_logstash_cleanup" } } } |