Metrics for illegal_argument_exception mapping conflicts

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?

I found a metric called indexing.index_failed 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?

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