I'm using match_all{} because all my metricsets are of memory type. It shows that my memory usage is around 0.85 but still no actions are triggered and the condition.met is always false. Need help asap!
please open new threads instead of reviving old ones.
As already mentioned in this thread: If you are stuck, the first thing should always be to check either the last watch history entry or use the Execute Watch API to check what happens during every step of execution.
If you check the condition part of that output, you will see, that the condition path does not resolve to anything. As ctx.payload.hits.hits is an array, you have to specify the element you want to acccess.
That said, the approach to this watch is not the right one. Querying all documents and seeing which ones are fulfilled in the response does not make sense. You should use proper filters in your documents, like filtering by date, filtering by memory used, so that you also prevent the same documents triggering an alert over and over again.
Take a look at the already mentioned examples repo.
I'm having a little problem with understanding the example filesystem watch. Can you please correct my JSON? I need a little help here.
In short, filtering the documents by timestamp, reducing the result size to 1 and referring to the first element of the ctx.payload.hits.hits array will do the job, right?
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.