How to find the number of times a particular log event happened in the ES using query

I'm trying to run a query to find the matching text in a message field and I'm trying to gather the results from the response to analyse the number of such events happening.

query = {
      "query": {
        "match": { "message": "Job failed abruptly. Need to rerun the job as soon as possible" }
      }
    }

How to find the the number of such failed events happened based search query? Any suggestions?

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