Hi I am trying to set a condition for a watch that looks at a percentile of the response time of the API. The problem is that the field I need to look at in the tree has the value of "90.0" since this is how ES returns percentile values.
I have tried all combinations even using ['90.0'] to no avail. Problem is I cannot use something like this: [note I was able to change the agg name from "1" to "nth" but cannot do the same with the percentile]
How can I set this watch? I cannot find anyway, appreciate your help.
Ali, it appears that implementing the same check using watcher compare is not working, one of our developer found out and it is most likely a bug. using scripting for now is a valid workaround.
For the example that Antonio shared, you do need to enable scripting.
However, it's easy to make the percentiles aggregation return it's results in a slightly different format that you can use with the compare condition. If you add "keyed":true to the percentiles aggregation, the results will come back in an array with keys and values, which are easy to parse.
In fact, I demonstrated doing this in a Webinar in July You can skip to around 30:00 to see the example an how I used it:
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.