Can I get an email alert on watcher when no data found?

Hi All,

I want to execute a file. When no logs on specific time, I want email alert.
Is this possible through watcher?

When there is no data found, I can't get any email alerts.

Yes.
https://www.elastic.co/guide/en/x-pack/current/condition-compare.html#_using_a_compare_condition

The condition below would execute any of the watch actions when the search result return less than or equal to 0.

{
  "condition" : {
    "compare" : {
      "ctx.payload.hits.total" : { 
        "lte" : 0
      }
  }
}

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