# Unable to change the elasticsearch indexname in herbeat 6.5 version

**URL:** https://discuss.elastic.co/t/unable-to-change-the-elasticsearch-indexname-in-herbeat-6-5-version/187104
**Category:** Beats
**Tags:** beats-module
**Created:** [June 24, 2019, 10:55am UTC](https://discuss.elastic.co/t/unable-to-change-the-elasticsearch-indexname-in-herbeat-6-5-version/187104 "2019-06-24T10:55:18Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![iamyogesh](https://avatars.discourse-cdn.com/v4/letter/i/e47c2d/32.png) [@iamyogesh](https://discuss.elastic.co/u/iamyogesh)
#### Post date: [June 24, 2019, 10:55am UTC](https://discuss.elastic.co/t/unable-to-change-the-elasticsearch-indexname-in-herbeat-6-5-version/187104/1 "2019-06-24T10:55:18Z")

</div>

from heartbeat am monitoring ip address is up or down using icmp configuration and writing data to elasticsearch by default it write the index to heartbeat-6.5.4-\*\* i need to change the default index name giving following configuration its not creating a custom index name.

or is there way to write a heartbeat data to different index or document type.?

hosts: ["http://\*\*\*_:9200"]  
output.elasticsearch.index: "customname-%{[agent.version]}-%{+yyyy.MM.dd}"  
setup.template.name: "customname"  
setup.template.pattern: "customname-_"  
setup.template.enabled: true  
setup.template.overwrite: true

---

<div class="post-metadata">

### Author: ![Michael\_Madden](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/michael_madden/32/46640_2.png) [@Michael\_Madden](https://discuss.elastic.co/u/Michael_Madden)
#### Post date: [June 24, 2019, 9:57pm UTC](https://discuss.elastic.co/t/unable-to-change-the-elasticsearch-indexname-in-herbeat-6-5-version/187104/2 "2019-06-24T21:57:45Z")

</div>

Hi Yogesh, thanks for your post. I also saw a similar post for 7.1.1. I'll see if I can find a common thread in these posts & will let you know.

> [@Beats-7.1.1 does not create index for custom pattern](https://discuss.elastic.co/t/beats-7-1-1-does-not-create-index-for-custom-pattern/187092):
>
> Beats does not create an index from output.elasticsearch.index. I have this configuration for metricbeat: metricbeat.config.modules: path: ${path.config}/modules.d/\*.yml reload.enabled: false setup.template.enabled: true setup.template.overwrite: true setup.template.pattern: "m-\*" setup.template.name: "metricbeat7" setup.template.settings: index.number\_of\_shards: 1 index.number\_of\_replicas: 0 index.refresh\_interval: "15s" index.mapping.total\_fields.limit: 999 index.codec: best\_com…

Thanks.

---

<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 22, 2019, 11:57pm UTC](https://discuss.elastic.co/t/unable-to-change-the-elasticsearch-indexname-in-herbeat-6-5-version/187104/3 "2019-07-22T23:57:50Z")

</div>

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