Logging failed shards in search response

My team would like to keep track of occurrences of shard failures. Is there any way to enable logging of such events?

To clarify, the event that I would like to log is the occurrence of "failed" in the _shards block of the search response.

  "_shards" : {
    "total" : 5,
    "successful" : 5,
    "failed" : 0

Any ideas on how this could be done?

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