[Watcher]If else like conditionals?

Hi,

Is it possible to use some form of conditionals to run different conditionals and actions based on a query?

e.g. I want to write a query that returns a SUM for field A and returns true/false for field B and C and then execute the watcher like this:

If query result SUM field A is > 100 and field B is false
Run report action
Write field B true to myindex
else if SUM field A is > 200 and field B is true
Run report action
else if SUM field A is > 300 and field C is false or Field C does not exist
Do nothing & end

The goal is to have a single watcher generate reports if certain values are exceeded but only at certain values based on the interval.

I don't think this can be done with throttling so I'm looking for a different solution.

hey,

every action can have its own condition. See https://www.elastic.co/guide/en/elastic-stack-overview/6.3/action-conditions.html

--Alex

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