# Dead letter queue not printing logs for events failed to get indexed in Elasticsearch

**URL:** <https://discuss.elastic.co/t/dead-letter-queue-not-printing-logs-for-events-failed-to-get-indexed-in-elasticsearch/263967>\
**Category:** Elasticsearch\
**Created:** [February 11, 2021, 8:47am UTC](https://discuss.elastic.co/t/dead-letter-queue-not-printing-logs-for-events-failed-to-get-indexed-in-elasticsearch/263967 "2021-02-11T08:47:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ankitdevnalkar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ankitdevnalkar/32/46158_2.png) [@ankitdevnalkar](https://discuss.elastic.co/u/ankitdevnalkar)\
**Post date:** [February 11, 2021, 8:47am UTC](https://discuss.elastic.co/t/dead-letter-queue-not-printing-logs-for-events-failed-to-get-indexed-in-elasticsearch/263967/1 "2021-02-11T08:47:17Z")

</div>

**Objective: print log/event in a log file which are failed to index in Elasticsearch.**

I am ingesting logs via SQS input and few messages are getting failed to index in Elasticsearch. I have debug logs and it shows the following error. I want to configure something like if a message gets failed to index then it should create a log file containing the message body and error message so I can go and keep track of failed messages.

`[WARN] 2021-02-11 12:06:00.675 [[main]>worker0] elasticsearch - Could not index event to Elasticsearch. {:status=>400, :action=>["index", {:_id=>nil, :_index=>"wallet-bitgo-tx-5e75adf5d133322f00fbd926a693b2ee-2021.02", :routing=>nil, :_type=>"_doc"}, #<LogStash::Event:0x80276f1>], :response=>{"index"=>{"_index"=>"wallet-bitgo-tx-5e75adf5d133322f00fbd926a693b2ee-2021.02", "_type"=>"_doc", "_id"=>"tYzNj3cBhtDPI8Cvu5gl", "status"=>400, "error"=>{"type"=>"illegal_argument_exception", "reason"=>"mapper [inputs.valueUnitAmount] cannot be changed from type [float] to [long]"}}}}`

---

<div class="post-metadata">

**Author:** ![ankitdevnalkar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ankitdevnalkar/32/46158_2.png) [@ankitdevnalkar](https://discuss.elastic.co/u/ankitdevnalkar)\
**Post date:** [February 16, 2021, 12:42pm UTC](https://discuss.elastic.co/t/dead-letter-queue-not-printing-logs-for-events-failed-to-get-indexed-in-elasticsearch/263967/2 "2021-02-16T12:42:30Z")

</div>

Can anyone help ?

---

<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 16, 2021, 12:42pm UTC](https://discuss.elastic.co/t/dead-letter-queue-not-printing-logs-for-events-failed-to-get-indexed-in-elasticsearch/263967/3 "2021-03-16T12:42:40Z")

</div>

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