# Metricbeat + Kibana Dashboards \[esaggs\] \> "field" is a required parameter

**URL:** https://discuss.elastic.co/t/metricbeat-kibana-dashboards-esaggs-field-is-a-required-parameter/225860
**Category:** Beats
**Tags:** metricbeat
**Created:** [March 31, 2020, 12:36pm UTC](https://discuss.elastic.co/t/metricbeat-kibana-dashboards-esaggs-field-is-a-required-parameter/225860 "2020-03-31T12:36:45Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![ffknob](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ffknob/32/37008_2.png) [@ffknob](https://discuss.elastic.co/u/ffknob)
#### Post date: [March 31, 2020, 12:36pm UTC](https://discuss.elastic.co/t/metricbeat-kibana-dashboards-esaggs-field-is-a-required-parameter/225860/1 "2020-03-31T12:36:46Z")

</div>

Hello,

I've just deployed a cluster in the Elastic Cloud and configured a metricbeat agent to send metrics to that cluster.

Here is my `metricbeat.yml`:

```auto
name: "xyz.acme.co"

tags: ["ACME", "acme.co"]

setup.ilm.check_exists: false

cloud.id: "..."

setup.kibana.host: "..."
setup.kibana.protocol: "https"

setup.dashboards.enabled: true

metricbeat.modules:
- module: system
  enabled: true
  period: 1m

```

1. Shouldn't Metricbeat's "setup --dashboards" and "setup.dashboards.enabled: true" only set up dashboards for the agent's configured modules?

2. I am getting alot of errors trying when accessing the dashboards:

Below you can see the `[esaggs] > "field" is a required parameter` errors...

 ![Bildschirmfoto vom 2020-03-31 09-23-08](https://us1.discourse-cdn.com/elastic/original/3X/e/6/e6ffcc1e0ba2f96720b4bc00adab836cd54bc0cb.png)

When taking a look at one specific visualization I can see that the field config is not set (it should be set to "host.name" accordingly to the saved object config, but in the index pattern that's not an aggregatable field):

 ![Bildschirmfoto vom 2020-03-31 09-24-19](https://us1.discourse-cdn.com/elastic/original/3X/3/6/36878ed1c7c89b07ff128005b2ba77ec0b969ff6.png)

If I set it to `host.name.keyword` it works:

 ![Bildschirmfoto vom 2020-03-31 09-25-15](https://us1.discourse-cdn.com/elastic/original/3X/b/e/be5854476d90170c613786abec6a663dd0b0d1b6.png)

Here is the Saved Object code. You can see that it acctually is set to use the `host.name`:  
 ![Bildschirmfoto vom 2020-03-31 09-27-24](https://us1.discourse-cdn.com/elastic/original/3X/0/c/0c4f157e8c8810c8ec3db2148072164b11df24c3.png)

This is related to [[Metricbeat Docker] Overview ECS is showing no data and error: [esaggs] \> "field" is a required parameter](https://discuss.elastic.co/t/metricbeat-docker-overview-ecs-is-showing-no-data-and-error-esaggs-field-is-a-required-parameter/206540), but I've already tryied to delete index, template, index pattern, even saved objects... no luck.

Thank you!

---

<div class="post-metadata">

### Author: ![ffknob](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ffknob/32/37008_2.png) [@ffknob](https://discuss.elastic.co/u/ffknob)
#### Post date: [March 31, 2020, 3:31pm UTC](https://discuss.elastic.co/t/metricbeat-kibana-dashboards-esaggs-field-is-a-required-parameter/225860/2 "2020-03-31T15:31:05Z")

</div>

I've managed to get some visualizations to work by setting "some-field.keyword" (host.name.keyword, process.name.keyword, ...), but the whole thing just looks broken.

Did I got anything wrong? I took a look at the dashboards that comes with the metricbeat.tar.gz and they all refer to fields without the ".keyword".

---

<div class="post-metadata">

### Author: ![ChrsMark](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chrsmark/32/55858_2.png) [@ChrsMark](https://discuss.elastic.co/u/ChrsMark)
#### Post date: [April 1, 2020, 9:07am UTC](https://discuss.elastic.co/t/metricbeat-kibana-dashboards-esaggs-field-is-a-required-parameter/225860/3 "2020-04-01T09:07:17Z")

</div>

> [@ffknob](#):
>
> Shouldn't Metricbeat's "setup --dashboards" and "setup.dashboards.enabled: true" only set up dashboards for the agent's configured modules?

It will setup all the Dashboards.

In general I would suggest to carefully setup indexes, templates etc and check that field mappings are stored correctly and then in a separate step to setup the Dashboards.

---

<div class="post-metadata">

### Author: ![ffknob](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ffknob/32/37008_2.png) [@ffknob](https://discuss.elastic.co/u/ffknob)
#### Post date: [April 1, 2020, 11:11am UTC](https://discuss.elastic.co/t/metricbeat-kibana-dashboards-esaggs-field-is-a-required-parameter/225860/4 "2020-04-01T11:11:58Z")

</div>

It's just that I have a 7.6 cluster and I am using a 7.6.1 Metricbeat agent... I don't see how could this not work out of the box... I mean, did I do something in the wrong order or something? This should not have to be that complicated...

I basically followed the docs:

```auto
1. metricbeat setup --dashboards
2. metricbeat -e

```

Just took a look at the same visualization in [demo.elastic.co](http://demo.elastic.co) an it uses "host.name", and not "host.name.keyword".

 ![Bildschirmfoto vom 2020-04-01 08-13-52](https://us1.discourse-cdn.com/elastic/original/3X/1/4/1439b20d385f23e66c83cc76bec5c6fb39c1d87e.png)

But [demo.elastic.co](http://demo.elastic.co) is a 7.5.1 cluster, and I am running a 7.6.1. There's a difference in the index pattern of the two (but the question is, is thaton pourpose, or did I do something wrong?)

7.5.1

 ![Bildschirmfoto vom 2020-04-01 08-17-40](https://us1.discourse-cdn.com/elastic/original/3X/6/f/6fa5a97e0fb1a5d40805dd64f0f327ffac562258.png)

7.6.1

 ![Bildschirmfoto vom 2020-04-01 08-18-20](https://us1.discourse-cdn.com/elastic/original/3X/c/c/cc78ebf73ac160d3695dc1ab1bfe29917251c157.png)

---

<div class="post-metadata">

### Author: ![ffknob](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ffknob/32/37008_2.png) [@ffknob](https://discuss.elastic.co/u/ffknob)
#### Post date: [April 1, 2020, 4:54pm UTC](https://discuss.elastic.co/t/metricbeat-kibana-dashboards-esaggs-field-is-a-required-parameter/225860/5 "2020-04-01T16:54:41Z")

</div>

Did some testing and I am now positive that the issue has to do with the index pattern... or with whatever sets it.

When I run `./metricbeat setup --dashboards` it creates the dashboards and the index pattern with 3131 fields mapped. In this index pattern the `host.name` is correctly mapped.

But then when I run `./metricbeat -e` something overwrites the index pattern. The new index pattern has only 181 fields and the `host.name` is wrongly mapped.

---

<div class="post-metadata">

### Author: ![ffknob](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ffknob/32/37008_2.png) [@ffknob](https://discuss.elastic.co/u/ffknob)
#### Post date: [April 1, 2020, 5:41pm UTC](https://discuss.elastic.co/t/metricbeat-kibana-dashboards-esaggs-field-is-a-required-parameter/225860/6 "2020-04-01T17:41:03Z")

</div>

It turns out, I was doing something wrong...

I think at the beggining I indexed some metrics documents without having loaded the index templates, so Elasticsearch mapped for example `host.name` as text+keyword. That documents were kept in a metricbeat-7.6.1-\* index.

Throughout all my debugging I was cleaning things up by deleting the `_template/metricbeat-7.6.1` template and the `metricbeat-7.6.1` index. But to delete the indices what I should have done is `DELETE metricbeat-7.6.1-*`.

After I did that, I just:

1. Created the index templates: `sudo ./metricbeat setup --index-management -E 'output.elasticsearch.hosts: ["..."]' -E 'output.elasticsearch.username: "..."' -E 'output.elasticsearch.password: "..."'`

2. Set Kibana dashboards up: `sudo ./metricbeat setup --dashboards`

3. Got rid of the following parameters in `metricbeat.yml`

```auto
setup.ilm.check_exists: false
setup.template.overwrite: false
setup.template.enabled: false

```

1. Ran Metricbeat: `sudo ./metricbeat -e`

I think that's it. Just wanted to write the solution down in case anyone else faces the same issue.

---

<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: [April 29, 2020, 5:43pm UTC](https://discuss.elastic.co/t/metricbeat-kibana-dashboards-esaggs-field-is-a-required-parameter/225860/7 "2020-04-29T17:43:15Z")

</div>

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