How to get hits count as a filed value

Hello Experts,

When i search a query it gives total hits count in the kibana,
How to get the same count as a filed which i want to use to Triger the mail.

It would be great if someone helps

Regards,
Suresh

Hi @suresh123 ,

In Kibana 7.12 there will be Elasticsearch query rule type, where it will be possible to define triggers based on hit count.

Hi Vadims,

Unfortunately we are not using licensed X pack version, instead using Elastalert.

For example if i search any query it gives 100 hits and showing in Kibana.

I need the same count in a filed that i can use for sending as a alert using Elastalert.

Regards,
Suresh

As I understand Elastalert is developed and maintained by Yelp, not Elastic. In that case, I think you would have a greater chance of finding the answer by asking this question, maybe in Elastalert GitHub issues. I am not sure if they have any other dedicated place for questions.

Hi Vadims,

Thanks for your reply.

Is it possible to have a field for getting hits count whenever i search particular query for specific time.

If it is possible using Logstash then i can capture the field from the index leve.

Regards,
Suresh