# Can't specify custom index name in Filebeat

**URL:** https://discuss.elastic.co/t/cant-specify-custom-index-name-in-filebeat/204643
**Category:** Beats
**Tags:** filebeat
**Created:** [October 22, 2019, 12:35pm UTC](https://discuss.elastic.co/t/cant-specify-custom-index-name-in-filebeat/204643 "2019-10-22T12:35:34Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Devopsio](https://avatars.discourse-cdn.com/v4/letter/d/ebca7d/32.png) [@Devopsio](https://discuss.elastic.co/u/Devopsio)
#### Post date: [October 22, 2019, 12:35pm UTC](https://discuss.elastic.co/t/cant-specify-custom-index-name-in-filebeat/204643/1 "2019-10-22T12:35:34Z")

</div>

Hi. I'm struggling to separate log inputs by using indices in Filebeat, which sends its data to elasticsearch from docker containers. It creates an index with a default name. I tried to use setup.ilm.enabed: false to disable lifecycle management and it didn't help. What am I doing wrong? My ELK stack is 7.3 and I can't use logstash.

setup.ilm.enabled: false

#============================= Docker ========================================  
filebeat.autodiscover:  
providers:  
- type: docker  
templates:  
- condition:  
regexp:  
docker.container.image: myapp  
config:  
- type: container  
paths:  
- /var/lib/docker/containers/${data.docker.container.id}/\*.log

#============================= Filebeat modules ===============================

filebeat.config.modules:

path: ${path.config}/modules.d/\*.yml  
reload.enabled: true

#==================== Elasticsearch template setting ==========================  
setup.template.settings:  
index.number\_of\_shards: 1

#-------------------------- Elasticsearch output ------------------------------  
output.elasticsearch:  
hosts: ["elksrv:9200"]  
ilm.enabled: false

protocol: "http"  
username: "elastic"  
password: "changeme"  
indices:

- index: "myapp"  
when.contains:  
docker.container.image: "myapp"

setup.template.name: "notif5"  
setup.template.pattern: "notif5-\*"

processors:

- add\_host\_metadata: ~
- add\_cloud\_metadata: ~
- add\_docker\_metadata: ~  
(commented parts of the conf file is omitted)

---

<div class="post-metadata">

### Author: ![pmercado](https://avatars.discourse-cdn.com/v4/letter/p/59ef9b/32.png) [@pmercado](https://discuss.elastic.co/u/pmercado)
#### Post date: [October 23, 2019, 9:00am UTC](https://discuss.elastic.co/t/cant-specify-custom-index-name-in-filebeat/204643/2 "2019-10-23T09:00:05Z")

</div>

can you re-post using pre-formatted text to help reading the config file?

also the issue is not clear to me, are you having problems creating a custom index name with filebeat, or having issues disabling or enabling ILM?

---

<div class="post-metadata">

### Author: ![Devopsio](https://avatars.discourse-cdn.com/v4/letter/d/ebca7d/32.png) [@Devopsio](https://discuss.elastic.co/u/Devopsio)
#### Post date: [October 23, 2019, 9:04am UTC](https://discuss.elastic.co/t/cant-specify-custom-index-name-in-filebeat/204643/3 "2019-10-23T09:04:09Z")

</div>

Yes, I'm having problems creating a custom index with filebeat. To do that I need to disable ILM via filebeat config and for some reason, I can't.

---

<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: [October 23, 2019, 3:47pm UTC](https://discuss.elastic.co/t/cant-specify-custom-index-name-in-filebeat/204643/4 "2019-10-23T15:47:30Z")

</div>

For disabling ILM, one thing I notice is that your config file includes `ilm.enabled: false` when it should probably be `setup.ilm.enabled: false`

---

<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: [November 20, 2019, 3:47pm UTC](https://discuss.elastic.co/t/cant-specify-custom-index-name-in-filebeat/204643/5 "2019-11-20T15:47:39Z")

</div>

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