# Metricbeats Configuration Issue: Loading index template in Elasticsearch doesn't work

**URL:** <https://discuss.elastic.co/t/metricbeats-configuration-issue-loading-index-template-in-elasticsearch-doesnt-work/184815>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [June 7, 2019, 9:46pm UTC](https://discuss.elastic.co/t/metricbeats-configuration-issue-loading-index-template-in-elasticsearch-doesnt-work/184815 "2019-06-07T21:46:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![EZprogramming](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ezprogramming/32/57291_2.png) [@EZprogramming](https://discuss.elastic.co/u/EZprogramming)\
**Post date:** [June 7, 2019, 9:46pm UTC](https://discuss.elastic.co/t/metricbeats-configuration-issue-loading-index-template-in-elasticsearch-doesnt-work/184815/1 "2019-06-07T21:46:37Z")

</div>

Hi everyone,

I am trying to change the default Metricbeat index name given to elasticsearch from

> _metricbeat-7.1.1-2019.06.07-000001_

to

> _beatsindex-7.1.1-2019.06.07-000001_

However my Elasticsearch index name doesn't change. Down below is my configuration file for metricbeat.yml, I appreciate any suggestions or feedback on what I am doing wrong.

_ **Background Info:** _

- **Metricbeat version:** metricbeat-7.1.1
- **Linux version:** 18.10

_ **metricbeat.yml** _:  
#========================== Modules configuration ============================

```
metricbeat.config.modules:
  # Glob pattern for configuration loading
  path: ${path.config}/modules.d/*.yml

  # Set to true to enable config reloading
  reload.enabled: true

  # Period on which files under path should be checked for changes
  reload.period: 5s

#==================== Elasticsearch template setting ==========================

setup.template.settings:
  index.number_of_shards: 1
  index.codec: best_compression
  _source.enabled: false

#-------------------------- Elasticsearch output ------------------------------
output.elasticsearch:
  # Array of hosts to connect to.
  hosts: ["***.aws.found.io:9243/"]

  # Optional protocol and basic auth credentials.
  protocol: "https"
  username: "elastic"
  password: "changeme"
  index: "beatsindex-%{[agent.version]}-%{+yyyy.MM.dd}"

setup.template.name: "beatsindex"
setup.template.pattern: "beatsindex-*"

#================================ Processors =====================================

# Configure processors to enhance or manipulate events generated by the beat.

processors:
  - add_host_metadata: ~
  - add_cloud_metadata: ~

```

---

<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 24, 2019, 5:22pm UTC](https://discuss.elastic.co/t/metricbeats-configuration-issue-loading-index-template-in-elasticsearch-doesnt-work/184815/2 "2019-06-24T17:22:03Z")

</div>

I have same problem.  
But I used any magic with parameters `setup.template`, but it still did not help

I suspect that this is an error version 7.0-7.1  
Probably after introduction of ILP+Beats Enroll, new redefinitions of functions were added and this pulled this error.

---

<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, 5:22pm UTC](https://discuss.elastic.co/t/metricbeats-configuration-issue-loading-index-template-in-elasticsearch-doesnt-work/184815/3 "2019-07-22T17:22:03Z")

</div>

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