# Metrics for illegal\_argument\_exception mapping conflicts

**URL:** <https://discuss.elastic.co/t/metrics-for-illegal-argument-exception-mapping-conflicts/156747>\
**Category:** Elasticsearch\
**Created:** [November 14, 2018, 9:58pm UTC](https://discuss.elastic.co/t/metrics-for-illegal-argument-exception-mapping-conflicts/156747 "2018-11-14T21:58:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nhnicwaller](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nhnicwaller/32/37645_2.png) [@nhnicwaller](https://discuss.elastic.co/u/nhnicwaller)\
**Post date:** [November 14, 2018, 9:58pm UTC](https://discuss.elastic.co/t/metrics-for-illegal-argument-exception-mapping-conflicts/156747/1 "2018-11-14T21:58:03Z")

</div>

Does Elasticsearch expose any metrics about the number of times requests are refused with type: `illegal_argument_exception`? I have encountered several scenarios recently where document indexing fails with this familiar HTTP 400 error message:

> "[response] is defined as an object in mapping [json-nodejs] but this name is already used for a field in other types

But the client(s) may not be trusted to generate appropriate error logs when receiving this response. I would like to be notified sooner about failures to index documents, and also to better understand how often we are affected by this issue. For both cases, it would be very helpful if Elasticsearch exposed a metric showing the number of documents which were unable to be indexed, especially due to mapping conflicts.

Is such a metric tracked and exposed? If not, how should I request this as a feature for a future release?

---

<div class="post-metadata">

**Author:** ![nhnicwaller](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nhnicwaller/32/37645_2.png) [@nhnicwaller](https://discuss.elastic.co/u/nhnicwaller)\
**Post date:** [November 14, 2018, 10:08pm UTC](https://discuss.elastic.co/t/metrics-for-illegal-argument-exception-mapping-conflicts/156747/2 "2018-11-14T22:08:56Z")

</div>

I found a metric called [indexing.index\_failed](https://www.elastic.co/guide/en/elasticsearch/reference/5.5/cat-nodes.html) in the cat nodes API, but this always seems to return 0 regardless of whether documents have recently failed indexing. Not sure if that's a bug or a totally unrelated metric?

---

<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:** [December 12, 2018, 10:08pm UTC](https://discuss.elastic.co/t/metrics-for-illegal-argument-exception-mapping-conflicts/156747/3 "2018-12-12T22:08:59Z")

</div>

Closed on December 12, 2018, 10:08pm UTC

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