What happens when the watch triggers? can u plz capture the logs and compare it to the time when it does not trigger ?
Also alternatively, you may want to try instead then is the execute watch API, but with simulated action modes like this
POST _watcher/watch/my-watch/_execute
{
"action_modes" : {
"_all" : "simulate"
}
}
Which executes your configured search, but will not execute the actions.. yet return useful info in the JSON response. Using the alternative_input
with some scripting on the client side might be easier, to be honest.
Here is the link to similar question on testing a watch.: How can Watchers be tested?
https://www.elastic.co/blog/watching-the-watches-writing-debugging-and-testing-watches