Create 2 independent watcher alerts with the desired scheduling and condition for each one. More verbose but simpler to maintain.
Use only one alert with a script condition instead of a simple compare. That enables you to:
Use any data inside the watcher context (input search results, trigger dates, etc)
Set multiple conditions ( X >=50 and ctx.whatever_time_reference_you_like >= time_init_1 and ctx.whatever_time_reference_you_like <= time_end_1 ) OR (X>=10 and ctx.whatever_time_you_like >= time_init_2 and ...)
As you imagine, the latest one won't be beautiful at all...
in addition you can have conditions on a per action base. So you could trigger action1 (i.e. send a slack message) for your first condition and action2 (i.e. send an email) with the second condition.
Hi Sinscale
thank you for update
I mean check up same error code.
when payload.hits.total greater than 10 @time 00.00 - 06.00 and payload.hits.total greater than 50 @time 06.01 - 23.59
same error code check but different time of the day
using a script based condition you can execute all the logic you want within a condition and also take the current time into account by utilizing ctx.trigger.triggered_time
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.