# Cant't change index name in metricbeat

**URL:** https://discuss.elastic.co/t/cantt-change-index-name-in-metricbeat/195182
**Category:** Beats
**Tags:** metricbeat
**Created:** [August 14, 2019, 10:03am UTC](https://discuss.elastic.co/t/cantt-change-index-name-in-metricbeat/195182 "2019-08-14T10:03:51Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![simple\_commentateur](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/simple_commentateur/32/45428_2.png) [@simple\_commentateur](https://discuss.elastic.co/u/simple_commentateur)
#### Post date: [August 14, 2019, 10:03am UTC](https://discuss.elastic.co/t/cantt-change-index-name-in-metricbeat/195182/1 "2019-08-14T10:03:51Z")

</div>

Hello,

I want to change the index name for the metricbeat.

For that I try to change index name in Outputs of _metricbeat.yml_ and _metricbeat.reference.yml_ file as shown below :

```
setup.template.name: "test-"
setup.template.pattern: "test-*"

output.elasticsearch:
  # Array of hosts to connect to.
  hosts: ["localhost:9200"]
  index: "test-"

```

But the index keeps the default name.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/5/2/5231f8365fbb7e4647297b52ee0e95da637360c1.png)

Is there a problem in my configuration ?

---

<div class="post-metadata">

### Author: ![rugenl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rugenl/32/12887_2.png) [@rugenl](https://discuss.elastic.co/u/rugenl)
#### Post date: [August 14, 2019, 5:52pm UTC](https://discuss.elastic.co/t/cantt-change-index-name-in-metricbeat/195182/2 "2019-08-14T17:52:36Z")

</div>

7.x is setup.ilm.enabled: auto, so setup.ilm.rollover\_alias probably needs to be set. You'll have to run metricbeat setup again and restart metricbeat.

---

<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: [September 11, 2019, 5:52pm UTC](https://discuss.elastic.co/t/cantt-change-index-name-in-metricbeat/195182/3 "2019-09-11T17:52:39Z")

</div>

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