# Could not index event to Elasticsearch 400

**URL:** <https://discuss.elastic.co/t/could-not-index-event-to-elasticsearch-400/177459>\
**Category:** Logstash\
**Created:** [April 18, 2019, 12:16pm UTC](https://discuss.elastic.co/t/could-not-index-event-to-elasticsearch-400/177459 "2019-04-18T12:16:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nandha\_88](https://avatars.discourse-cdn.com/v4/letter/n/3e96dc/32.png) [@nandha\_88](https://discuss.elastic.co/u/nandha_88)\
**Post date:** [April 18, 2019, 12:16pm UTC](https://discuss.elastic.co/t/could-not-index-event-to-elasticsearch-400/177459/1 "2019-04-18T12:16:31Z")

</div>

Hi All,

I have updated the filebeat and elk stack from 6.2.4 to 6.6.1 and ended up with the below error message in the logstash log.

"[2019-04-18T17:24:04,887][WARN][logstash.outputs.elasticsearch] Could not index event to Elasticsearch. {:status=\>400, :action=\>["index", {:\_id=\>nil, :\_index=\>"logstash-2019.04.18", :\_type=\>"doc", :routing=\>nil}, #LogStash::Event:0x5376923c], :response=\>{"index"=\>{"\_index"=\>"logstash-2019.04.18", "\_type"=\>"doc", "\_id"=\>"uxpLMGoBeNmtE8up8rvR", "status"=\>400, "error"=\>{"type"=\>"mapper\_parsing\_exception", "reason"=\>"object mapping for [host] tried to parse field [host] as object, but found a concrete value"}}}}"

I have seen below is the fix , but the probelm is I have 6 filter.conf file and not sure in which file to place it

filter {  
mutate {  
remove\_field =\> ["[host]" ]  
}

---

<div class="post-metadata">

**Author:** ![olatunde.tokun](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/olatunde.tokun/32/110546_2.png) [@olatunde.tokun](https://discuss.elastic.co/u/olatunde.tokun)\
**Post date:** [April 18, 2019, 6:54pm UTC](https://discuss.elastic.co/t/could-not-index-event-to-elasticsearch-400/177459/2 "2019-04-18T18:54:05Z")

</div>

The version of filebeat 6.6 from the sources have an exported field host.\* [https://www.elastic.co/guide/en/beats/filebeat/6.6/exported-fields-host-processor.html](https://www.elastic.co/guide/en/beats/filebeat/6.6/exported-fields-host-processor.html)

You can either drop this from the logsource filebeat config or remove this host field from all your 6 filter.conf files.

Using output stdout would let you figure the culprit field mismatch

Alternatively create a new index in elasticsearch with host as objects and not strings.

---

<div class="post-metadata">

**Author:** ![nandha\_88](https://avatars.discourse-cdn.com/v4/letter/n/3e96dc/32.png) [@nandha\_88](https://discuss.elastic.co/u/nandha_88)\
**Post date:** [April 23, 2019, 4:40am UTC](https://discuss.elastic.co/t/could-not-index-event-to-elasticsearch-400/177459/3 "2019-04-23T04:40:00Z")

</div>

Hi Olatunde,

I have comment all the host values in the field.yml in the filebeat config.  
I did it for just one host and it fine.

Shall I do the change for all the servers ?

Regards  
Nandha

---

<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:** [May 21, 2019, 4:40am UTC](https://discuss.elastic.co/t/could-not-index-event-to-elasticsearch-400/177459/4 "2019-05-21T04:40:01Z")

</div>

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