# Filebeat Autogenerating Index Name When I Specified: sample-%

**URL:** https://discuss.elastic.co/t/filebeat-autogenerating-index-name-when-i-specified-sample/219038
**Category:** Beats
**Tags:** filebeat
**Created:** [February 12, 2020, 4:04pm UTC](https://discuss.elastic.co/t/filebeat-autogenerating-index-name-when-i-specified-sample/219038 "2020-02-12T16:04:50Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![daz1761](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/daz1761/32/61856_2.png) [@daz1761](https://discuss.elastic.co/u/daz1761)
#### Post date: [February 12, 2020, 4:04pm UTC](https://discuss.elastic.co/t/filebeat-autogenerating-index-name-when-i-specified-sample/219038/1 "2020-02-12T16:04:51Z")

</div>

I have specified the `index` in my `filebeat.yml` as `sample-%{+YYY.MM.dd} but when I check my indices via `/\_cat/indices?v`my`index`looks like a some form of autogenerated name like:`filebeat-7.5.2-2020.02.12-000001`

```
# setup filebeat to send output to elasticsearch
output.elasticsearch:
  hosts: ["elasticsearch:9200"]
  index: "sample-%{+YYYY.MM.dd}"
  
setup.template.name: "sample"
setup.template.pattern: "sample-*" 

```

Can someone please explain to me why this is happening. I would preferably have a predefined `index` name as opposed to the one above.

---

<div class="post-metadata">

### Author: ![faec](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/faec/32/46988_2.png) [@faec](https://discuss.elastic.co/u/faec)
#### Post date: [February 14, 2020, 6:36pm UTC](https://discuss.elastic.co/t/filebeat-autogenerating-index-name-when-i-specified-sample/219038/2 "2020-02-14T18:36:16Z")

</div>

This is probably caused by ILM ([index lifecycle management](https://www.elastic.co/guide/en/beats/filebeat/current/ilm.html)), which overrides the output-level index settings. If you don't want Filebeat to manage your indices, you should include `setup.ilm.enabled: false`. If you want to keep using ILM but change the name, you probably want to set `setup.ilm.rollover_alias` (see the previous link for details).

As a general warning, though, it's usually best to start the index name with `filebeat` even if you customize it (e.g. `filebeat-sample` would be fine) because a lot of the automatic settings expect it.

---

<div class="post-metadata">

### Author: ![daz1761](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/daz1761/32/61856_2.png) [@daz1761](https://discuss.elastic.co/u/daz1761)
#### Post date: [February 14, 2020, 7:20pm UTC](https://discuss.elastic.co/t/filebeat-autogenerating-index-name-when-i-specified-sample/219038/3 "2020-02-14T19:20:49Z")

</div>

Thank you. Is that in the Filebeat.yml or the configuration? I’m using the containerised ELK in my case.

---

<div class="post-metadata">

### Author: ![faec](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/faec/32/46988_2.png) [@faec](https://discuss.elastic.co/u/faec)
#### Post date: [February 14, 2020, 7:46pm UTC](https://discuss.elastic.co/t/filebeat-autogenerating-index-name-when-i-specified-sample/219038/4 "2020-02-14T19:46:29Z")

</div>

The ILM settings should be in `filebeat.yml`, yes.

---

<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: [March 13, 2020, 7:46pm UTC](https://discuss.elastic.co/t/filebeat-autogenerating-index-name-when-i-specified-sample/219038/5 "2020-03-13T19:46:45Z")

</div>

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