# Filebat - Create a custom index on elasticsearch

**URL:** https://discuss.elastic.co/t/filebat-create-a-custom-index-on-elasticsearch/197741
**Category:** Beats
**Tags:** filebeat
**Created:** [September 3, 2019, 12:04am UTC](https://discuss.elastic.co/t/filebat-create-a-custom-index-on-elasticsearch/197741 "2019-09-03T00:04:27Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![jaderolyver](https://avatars.discourse-cdn.com/v4/letter/j/a4c791/32.png) [@jaderolyver](https://discuss.elastic.co/u/jaderolyver)
#### Post date: [September 3, 2019, 12:04am UTC](https://discuss.elastic.co/t/filebat-create-a-custom-index-on-elasticsearch/197741/1 "2019-09-03T00:04:27Z")

</div>

Please someone here understand what is happen with my config, my filebeat doenst create index with my custom name. When i run the command filebeat setup the filebeat communicate with my elastic and create a index default filebeat.

filebeat.inputs:

- type: log  
enabled: true  
paths:
  - /var/log/\*.log

setup.template.enabled: false  
setup.template.name: 'srvprod\_beat'  
setup.template.pattern: 'srvprod\_beat-\*'

output.elasticsearch:  
hosts: ["srvelastic:9200"]  
username: "user-elastic"  
password: "MyPassWord"  
index: 'srvprod\_beat-%{[agent.version]}-%{+dd.MM.yyyy}'

My filebeat, elastic-cluster, kibana is 7.3 all Linux.

---

<div class="post-metadata">

### Author: ![Anantha\_Padmanabhan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anantha_padmanabhan/32/52794_2.png) [@Anantha\_Padmanabhan](https://discuss.elastic.co/u/Anantha_Padmanabhan)
#### Post date: [September 11, 2019, 7:09pm UTC](https://discuss.elastic.co/t/filebat-create-a-custom-index-on-elasticsearch/197741/2 "2019-09-11T19:09:15Z")

</div>

Even I too face similar issue, is there any better documentation or anyone who can help on setting a custom index name?

---

<div class="post-metadata">

### Author: ![daniel\_a](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/daniel_a/32/48390_2.png) [@daniel\_a](https://discuss.elastic.co/u/daniel_a)
#### Post date: [September 11, 2019, 9:49pm UTC](https://discuss.elastic.co/t/filebat-create-a-custom-index-on-elasticsearch/197741/3 "2019-09-11T21:49:20Z")

</div>

I have the same issue. Did you fix it yet? 🙄

If you don't specify either an index template name nor its pattern name, you'll get an error (see below), but even if you do, the default template filebeat-7.3.1 is still getting loaded, 🤔 why!

`Exiting: setup.template.name and setup.template.pattern have to be set if index name is modified`

---

<div class="post-metadata">

### Author: ![Anantha\_Padmanabhan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anantha_padmanabhan/32/52794_2.png) [@Anantha\_Padmanabhan](https://discuss.elastic.co/u/Anantha_Padmanabhan)
#### Post date: [September 12, 2019, 7:02am UTC](https://discuss.elastic.co/t/filebat-create-a-custom-index-on-elasticsearch/197741/4 "2019-09-12T07:02:06Z")

</div>

If i mention setup.template.name and setup.template.pattern i dont get any error but still my index name remains filebeat-version-date.

---

<div class="post-metadata">

### Author: ![Himanshu\_Rajput](https://avatars.discourse-cdn.com/v4/letter/h/f05b48/32.png) [@Himanshu\_Rajput](https://discuss.elastic.co/u/Himanshu_Rajput)
#### Post date: [September 12, 2019, 7:18am UTC](https://discuss.elastic.co/t/filebat-create-a-custom-index-on-elasticsearch/197741/5 "2019-09-12T07:18:44Z")

</div>

Add the following configuration to filebeat  
**setup.ilm.enabled: false**

---

<div class="post-metadata">

### Author: ![daniel\_a](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/daniel_a/32/48390_2.png) [@daniel\_a](https://discuss.elastic.co/u/daniel_a)
#### Post date: [September 12, 2019, 4:59pm UTC](https://discuss.elastic.co/t/filebat-create-a-custom-index-on-elasticsearch/197741/6 "2019-09-12T16:59:32Z")

</div>

This line totally did the trick! Thanks!

---

<div class="post-metadata">

### Author: ![daniel\_a](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/daniel_a/32/48390_2.png) [@daniel\_a](https://discuss.elastic.co/u/daniel_a)
#### Post date: [September 12, 2019, 5:00pm UTC](https://discuss.elastic.co/t/filebat-create-a-custom-index-on-elasticsearch/197741/7 "2019-09-12T17:00:14Z")

</div>

@Anantha_Padmanabhan It's not that, I had that setup already. It was **setup.ilm.enabled: false**

---

<div class="post-metadata">

### Author: ![daniel\_a](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/daniel_a/32/48390_2.png) [@daniel\_a](https://discuss.elastic.co/u/daniel_a)
#### Post date: [September 12, 2019, 6:22pm UTC](https://discuss.elastic.co/t/filebat-create-a-custom-index-on-elasticsearch/197741/8 "2019-09-12T18:22:44Z")

</div>

@Anantha_Padmanabhan, it's a known issue

> <https://github.com/elastic/beats/issues/11866>

---

<div class="post-metadata">

### Author: ![jaderolyver](https://avatars.discourse-cdn.com/v4/letter/j/a4c791/32.png) [@jaderolyver](https://discuss.elastic.co/u/jaderolyver)
#### Post date: [September 12, 2019, 6:44pm UTC](https://discuss.elastic.co/t/filebat-create-a-custom-index-on-elasticsearch/197741/9 "2019-09-12T18:44:51Z")

</div>

Yep I did this but when you disable the ILM your filebeat doesn't auto create Lifecycle policy.

---

<div class="post-metadata">

### Author: ![Anantha\_Padmanabhan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anantha_padmanabhan/32/52794_2.png) [@Anantha\_Padmanabhan](https://discuss.elastic.co/u/Anantha_Padmanabhan)
#### Post date: [September 13, 2019, 5:23am UTC](https://discuss.elastic.co/t/filebat-create-a-custom-index-on-elasticsearch/197741/10 "2019-09-13T05:23:47Z")

</div>

yeah i too fixed it by doing the same temporarily..

---

<div class="post-metadata">

### Author: ![daniel\_a](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/daniel_a/32/48390_2.png) [@daniel\_a](https://discuss.elastic.co/u/daniel_a)
#### Post date: [September 13, 2019, 5:16pm UTC](https://discuss.elastic.co/t/filebat-create-a-custom-index-on-elasticsearch/197741/11 "2019-09-13T17:16:51Z")

</div>

It's an open issue since April, 2019.

---

<div class="post-metadata">

### Author: ![abhishek\_kumar3](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abhishek_kumar3/32/54032_2.png) [@abhishek\_kumar3](https://discuss.elastic.co/u/abhishek_kumar3)
#### Post date: [September 24, 2019, 6:27am UTC](https://discuss.elastic.co/t/filebat-create-a-custom-index-on-elasticsearch/197741/12 "2019-09-24T06:27:47Z")

</div>

@daniel_a Please use

`.\filebeat.exe setup --index-management`

This will set the index.

---

<div class="post-metadata">

### Author: ![daniel\_a](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/daniel_a/32/48390_2.png) [@daniel\_a](https://discuss.elastic.co/u/daniel_a)
#### Post date: [September 24, 2019, 7:30pm UTC](https://discuss.elastic.co/t/filebat-create-a-custom-index-on-elasticsearch/197741/13 "2019-09-24T19:30:58Z")

</div>

> [@Himanshu\_Rajput](#):
>
> setup.ilm.enabled: false

@abhishek_kumar3 Do I still need to include **setup.ilm.enabled: false**? If not, this would solve the issue I think with not having ILM enabled, right?

---

<div class="post-metadata">

### Author: ![abhishek\_kumar3](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abhishek_kumar3/32/54032_2.png) [@abhishek\_kumar3](https://discuss.elastic.co/u/abhishek_kumar3)
#### Post date: [September 25, 2019, 7:10am UTC](https://discuss.elastic.co/t/filebat-create-a-custom-index-on-elasticsearch/197741/14 "2019-09-25T07:10:20Z")

</div>

@daniel_a Yes, ilm is required once while setting up the index in the elastic search I think. For sending the data to a different index pattern, you may use that command I mentioned.

---

<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: [October 23, 2019, 7:10am UTC](https://discuss.elastic.co/t/filebat-create-a-custom-index-on-elasticsearch/197741/15 "2019-10-23T07:10:34Z")

</div>

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