# Metricbeat 7.2.1 custom index name: missing field accessing 'output.elasticsearch.index'

**URL:** https://discuss.elastic.co/t/metricbeat-7-2-1-custom-index-name-missing-field-accessing-output-elasticsearch-index/217548
**Category:** Beats
**Tags:** metricbeat
**Created:** [February 3, 2020, 1:04am UTC](https://discuss.elastic.co/t/metricbeat-7-2-1-custom-index-name-missing-field-accessing-output-elasticsearch-index/217548 "2020-02-03T01:04:56Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![brandnull](https://avatars.discourse-cdn.com/v4/letter/b/ec9cab/32.png) [@brandnull](https://discuss.elastic.co/u/brandnull)
#### Post date: [February 3, 2020, 1:04am UTC](https://discuss.elastic.co/t/metricbeat-7-2-1-custom-index-name-missing-field-accessing-output-elasticsearch-index/217548/1 "2020-02-03T01:04:56Z")

</div>

Hello, I'm trying to set up Metricbeat in different instances, gathering metrics in a single Elasticsearch node. However, I want to set up a custom index pattern per instance. In  
In `/etc/metricbeat/metricbeat.yml ` I have the following:

```
setup.ilm.enabled: false
output.elasticsearch.index: "kafka-dev-metricbeat-${[agent.version]}-%{+yyyy.MM.dd}"
setup.template.name: "kafka-dev-metricbeat"
setup.template.pattern: "kafka-dev-metricbeat-*"

```

If I don't use add the last three lines about `output.elasticsearch.index ` and `setup.template`, then it works for a single instance. However, if I add those lines and try to start metricbeat, then it fails with the following error:  
`ERROR instance/beat.go:877 Exiting: missing field accessing 'output.elasticsearch.index' (source:'/etc/metricbeat/metricbeat.yml')`

I can't find anything regarding this in the docs or forums, so any pointers regarding this are welcome. Thank you beforehand.

---

<div class="post-metadata">

### Author: ![brandnull](https://avatars.discourse-cdn.com/v4/letter/b/ec9cab/32.png) [@brandnull](https://discuss.elastic.co/u/brandnull)
#### Post date: [February 3, 2020, 8:36am UTC](https://discuss.elastic.co/t/metricbeat-7-2-1-custom-index-name-missing-field-accessing-output-elasticsearch-index/217548/2 "2020-02-03T08:36:34Z")

</div>

Solved it by changing `output.elasticsearch.index: "kafka-dev-metricbeat-${[agent.version]}-%{+yyyy.MM.dd}"` to `output.elasticsearch.index: "kafka-dev-metricbeat-%{[agent.version]}-%{+yyyy.MM.dd}"`.

However, when I start the service, it does not create the new index.

---

<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: [March 2, 2020, 8:36am UTC](https://discuss.elastic.co/t/metricbeat-7-2-1-custom-index-name-missing-field-accessing-output-elasticsearch-index/217548/3 "2020-03-02T08:36:38Z")

</div>

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