# Using index name in rollover alias

**URL:** <https://discuss.elastic.co/t/using-index-name-in-rollover-alias/207184>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [November 8, 2019, 10:57pm UTC](https://discuss.elastic.co/t/using-index-name-in-rollover-alias/207184 "2019-11-08T22:57:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bunjiboys](https://avatars.discourse-cdn.com/v4/letter/b/e5b9ba/32.png) [@bunjiboys](https://discuss.elastic.co/u/bunjiboys)\
**Post date:** [November 8, 2019, 10:57pm UTC](https://discuss.elastic.co/t/using-index-name-in-rollover-alias/207184/1 "2019-11-08T22:57:04Z")

</div>

We're trying to set up filebeat to use ILM with "automatic" index naming from our Kubernetes cluster.

Output configuration:

```auto
    output:
      elasticsearch:
        bulk_max_size: 1000
        enable: true
        hosts:
          - <ES_HOST>
        index: logs-filebeat
        indices:
          - index: logs-filebeat-%{[kubernetes.namespace]}
        password: <password>
        path: /
        username: <username>

```

ILM configuration:

```auto
    setup:
      ilm:
        enabled: true
        rollover_alias: "{elasticsearch.index.name}"
        pattern: "{now/d}-000001"
        policy_name: "logs-ilm-policy"
        overwrite: false
        check_exists: false
      template:
        name: logs-filebeat
        pattern: logs-filebeat*

```

I've tried any combination of fields / values for the rollover\_alias but it either doesn't expand the variable or it errors out with a key not found error

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 6, 2019, 10:57pm UTC](https://discuss.elastic.co/t/using-index-name-in-rollover-alias/207184/2 "2019-12-06T22:57:14Z")

</div>

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