# Unable to use own index name

**URL:** <https://discuss.elastic.co/t/unable-to-use-own-index-name/187510>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [June 26, 2019, 7:51am UTC](https://discuss.elastic.co/t/unable-to-use-own-index-name/187510 "2019-06-26T07:51:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ssharaf](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ssharaf/32/48801_2.png) [@ssharaf](https://discuss.elastic.co/u/ssharaf)\
**Post date:** [June 26, 2019, 7:51am UTC](https://discuss.elastic.co/t/unable-to-use-own-index-name/187510/1 "2019-06-26T07:51:38Z")

</div>

Greetings,

I started experimenting Elasticsearch with importing logs from different servers and docker containers using Filebeat. I was able to use KQL and build custom Kibana dashboards which is very good to better monitor our different services.

However, I started to struggle figuring out how to set index templates for each service instead of using the default "filebeat-x.x.x-yyyy-mm-dd" index and I tried to change it for each service but unfortunately it didn't work.

Below, you can find a sample filebeat.yml file which I use to try achieving this:

```
filebeat.config.modules:
  path: ${path.config}/modules.d/*.yml

filebeat.inputs:
- type: docker
  containers.ids:
    - "<container-id>"

  enabled: true

setup.template.name: "service"
setup.template.pattern: "service-*"
setup.template.enabled: false
setup.template.overwrite: false

setup.template.settings:
  index.number_of_shards: 1

cloud.id: "<cloud-id>"
cloud.auth: "elastic:<password>"

output.elasticsearch.index: "service-%{+yyyy.MM.dd}"

```

I tried running the following command and it keeps building the default template & index too:

`filebeat setup --template`

Note that I am using Debian to run filebeat.

I even created my own template directly using Kibana dev tools.

Could you please advise how can I be able to create custom index templates?

Thanks a lot!

---

<div class="post-metadata">

**Author:** ![rebirther](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rebirther/32/19228_2.png) [@rebirther](https://discuss.elastic.co/u/rebirther)\
**Post date:** [June 26, 2019, 7:55am UTC](https://discuss.elastic.co/t/unable-to-use-own-index-name/187510/2 "2019-06-26T07:55:40Z")

</div>

Index Lifecycle Management by default creates its own index name.  
Try to disable it first: `setup.ilm.enabled: false`  
[https://www.elastic.co/guide/en/beats/metricbeat/current/ilm.html](https://www.elastic.co/guide/en/beats/metricbeat/current/ilm.html)  
If it does not help, write here.

---

<div class="post-metadata">

**Author:** ![ssharaf](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ssharaf/32/48801_2.png) [@ssharaf](https://discuss.elastic.co/u/ssharaf)\
**Post date:** [June 26, 2019, 8:04am UTC](https://discuss.elastic.co/t/unable-to-use-own-index-name/187510/3 "2019-06-26T08:04:05Z")

</div>

It worked! Thank you very much Pavel.

---

<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:** [July 24, 2019, 8:04am UTC](https://discuss.elastic.co/t/unable-to-use-own-index-name/187510/4 "2019-07-24T08:04:11Z")

</div>

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