# Can't load metricbeat data: Fielddata is disabled on text fields by default

**URL:** https://discuss.elastic.co/t/cant-load-metricbeat-data-fielddata-is-disabled-on-text-fields-by-default/193178
**Category:** Beats
**Tags:** metricbeat
**Created:** [July 31, 2019, 4:23pm UTC](https://discuss.elastic.co/t/cant-load-metricbeat-data-fielddata-is-disabled-on-text-fields-by-default/193178 "2019-07-31T16:23:29Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![carson](https://avatars.discourse-cdn.com/v4/letter/c/e9bcb4/32.png) [@carson](https://discuss.elastic.co/u/carson)
#### Post date: [July 31, 2019, 4:23pm UTC](https://discuss.elastic.co/t/cant-load-metricbeat-data-fielddata-is-disabled-on-text-fields-by-default/193178/1 "2019-07-31T16:23:29Z")

</div>

I'm not sure what caused this, possibly my previous attempt to use logstash, or an index I once tried on metricbeat. I now send beats directly to elasticsearch. I'm using 7.1 for all parts of the ELK stack.

From the Infrastructure screen, if I click "View Metrics" on a host, I get an error in elasticsearch:

```
"Caused by: java.lang.IllegalArgumentException: Fielddata is disabled on text fields by default. Set fielddata=true on [host.name] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead.",
     "at org.elasticsearch.index.mapper.TextFieldMapper$TextFieldType.fielddataBuilder(TextFieldMapper.java:767) ~[elasticsearch-7.1.0.jar:7.1.0]",
     "at org.elasticsearch.index.fielddata.IndexFieldDataService.getForField(IndexFieldDataService.java:116) ~[elasticsearch-7.1.0.jar:7.1.0]", 
    ... 

```

**Things I've tried**

- Deleting all indices
- Deleting all templates
- Query using curl to try and fix the mapping, but cannot form the correct syntax for query

Please let me know other things I can try. This is breaking my metric data visualization, and I'm considering rolling back to 6.7 as I've seen that suggested.

---

<div class="post-metadata">

### Author: ![nitzan.karni](https://avatars.discourse-cdn.com/v4/letter/n/c57346/32.png) [@nitzan.karni](https://discuss.elastic.co/u/nitzan.karni)
#### Post date: [August 1, 2019, 12:20pm UTC](https://discuss.elastic.co/t/cant-load-metricbeat-data-fielddata-is-disabled-on-text-fields-by-default/193178/2 "2019-08-01T12:20:20Z")

</div>

Go to infrastructure -\> Configuration  
Under Fields section theres Host name Input for the host name field  
change it from host.name to host.name.keyword  
that should do the job.

---

<div class="post-metadata">

### Author: ![carson](https://avatars.discourse-cdn.com/v4/letter/c/e9bcb4/32.png) [@carson](https://discuss.elastic.co/u/carson)
#### Post date: [August 1, 2019, 1:58pm UTC](https://discuss.elastic.co/t/cant-load-metricbeat-data-fielddata-is-disabled-on-text-fields-by-default/193178/3 "2019-08-01T13:58:15Z")

</div>

I found the issue. I was somehow using an older version of the `metricbeat.yml` file. Once I got a fresh YML file and configured it, everything works as expected. This was a huge headache and I hope this helps someone as not many people have had this issue it seems. 😄

---

<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: [August 29, 2019, 1:58pm UTC](https://discuss.elastic.co/t/cant-load-metricbeat-data-fielddata-is-disabled-on-text-fields-by-default/193178/4 "2019-08-29T13:58:17Z")

</div>

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