Kibana Alerts configuration - Using ctx.results[0].hits.total

Hi,

Im trying to use the ctx.results[0].hits.total variable as a part of the message of the triggered alert. I have added the alert message content as below

Hi,
An event has occured.
Duration:

  • from: {{ctx.periodStart}}
  • to: {{ctx.periodEnd}}
  • count : {{ctx.results[0].hits.total}}
    Thanks,

The total hits is blank in the generated alert message. Please let me know how I can get the total hits in the alert message. Thanks!

Hi
Can you plz post your configured watch ?
and any associated logs when the watch triggers ? screenshots ? version?

Thanks
Rashmi

Try {{ctx.results.0.hits.total}}

2 Likes

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