# Custom Index error

**URL:** <https://discuss.elastic.co/t/custom-index-error/361148>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [June 10, 2024, 12:51pm UTC](https://discuss.elastic.co/t/custom-index-error/361148 "2024-06-10T12:51:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![uhxqc](https://avatars.discourse-cdn.com/v4/letter/u/a6a055/32.png) [@uhxqc](https://discuss.elastic.co/u/uhxqc)\
**Post date:** [June 10, 2024, 12:51pm UTC](https://discuss.elastic.co/t/custom-index-error/361148/1 "2024-06-10T12:51:50Z")

</div>

Hello,  
I am currently using Elastic Search and Kibana versions 8.11 along with Filebeat 8.11.2 on windows system.  
I have been able to send data to elastic through filebeat with the default filebeat\* index. I wanted my filebeat data to be stored into different indices for easier access and rule creation.  
I've followed the steps in [Configure Elasticsearch index template loading | Filebeat Reference [8.11] | Elastic](https://www.elastic.co/guide/en/beats/filebeat/8.11/configuration-template.html) to generate custom index but am failing to do so. I have added

```auto
filebeat.inputs:
setup.ilm.enabled: false
setup.template.name: "mycustomindex"
setup.template.pattern: "mycustomindex-*"

output.elasticsearch:
index: "mycustomindex"

```

But this seems to throw an error, and fails to run Start-Service Filebeat on power shell.  
Will be grateful for any input! Thank you!

---

<div class="post-metadata">

**Author:** ![ashishtiwari1993](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ashishtiwari1993/32/135241_2.png) [@ashishtiwari1993](https://discuss.elastic.co/u/ashishtiwari1993)\
**Post date:** [June 11, 2024, 1:57am UTC](https://discuss.elastic.co/t/custom-index-error/361148/2 "2024-06-11T01:57:35Z")

</div>

Hi @uhxqc, Could you please share the Error ?? You can check [troubleshoot](https://www.elastic.co/guide/en/beats/filebeat/current/troubleshooting.html) steps.

---

<div class="post-metadata">

**Author:** ![uhxqc](https://avatars.discourse-cdn.com/v4/letter/u/a6a055/32.png) [@uhxqc](https://discuss.elastic.co/u/uhxqc)\
**Post date:** [June 12, 2024, 1:52pm UTC](https://discuss.elastic.co/t/custom-index-error/361148/3 "2024-06-12T13:52:06Z")

</div>

Thank you @ashishtiwari1993, I will check the Troubleshoot, but is my details in the Filebeat.yml file correct, or any other changes have to be made to add a custom index from Filebeat?

---

<div class="post-metadata">

**Author:** ![ashishtiwari1993](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ashishtiwari1993/32/135241_2.png) [@ashishtiwari1993](https://discuss.elastic.co/u/ashishtiwari1993)\
**Post date:** [June 12, 2024, 2:22pm UTC](https://discuss.elastic.co/t/custom-index-error/361148/4 "2024-06-12T14:22:57Z")

</div>

Looks good. Same you can test with the below command:

```auto
./filebeat test config

```

---

<div class="post-metadata">

**Author:** ![uhxqc](https://avatars.discourse-cdn.com/v4/letter/u/a6a055/32.png) [@uhxqc](https://discuss.elastic.co/u/uhxqc)\
**Post date:** [June 24, 2024, 11:16am UTC](https://discuss.elastic.co/t/custom-index-error/361148/5 "2024-06-24T11:16:36Z")

</div>

Hello @ashishtiwari1993, seems like I had an issue with indentation and changing that resolved the issue, thank you for the **config** command!  
Just had a question, when I run

```auto
Start-Service filebeat
Get-Service filebeat
Status Name DisplayName
------ ---- -----------
Running filebeat filebeat

```

But immediately after just a few seconds when I run

```auto
Get-Service filebeat
Status Name DisplayName
------ ---- -----------
Stopped filebeat filebeat

```

Filebeat seems to automatically stop after a few seconds.  
Moreover I am not able to find any of the logs I am trying to upload using Filebeat.

Is there a solution to this?
