How to apply ILM to entire matching index pattern?


I'd like to apply the same Index Lifecycle Management policy to all indices with a certain pattern. Specifically I need to do this for all of our beats {metricbeat-, auditbeat-, etc.}. I need to perform this task via the API and not Kibana.

This does not work:

PUT _template/filebeat_rollover_template
  "index_patterns": ["filebeat-*"],
  "settings": {
    "number_of_shards": 1,
    "number_of_replicas": 1,
    "": "beat_default_lifecycle_policy",

Any suggestions?

Thank you!

Here's the solution:

PUT filebeat*/_settings
  "": "beat_default_lifecycle_policy"

I didn't see this page when I searched for it:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.