I was wondering if anyone may be able to lead me in the right direction...
I am setting up a Watcher alert that will compare a numeric field to see if it is greater than 10000 (example used in sample). And if it is then it will email that value and the IP address that is aligns with to a set email address.
I am running on version 5.6.2.
The issues I am running in to are that it will give ONLY 10 results and it seems like it ONLY compares to the 4th result.
This is the result that I get from that input with my data. Again Email and IPs have been removed. https://pastebin.com/fRexsM9c
On the results. Line 121 - Line 188 are the payload information that is being compared.
It compares to the "value": XXXXX and if true will then post the preceding "key": "IP ADDRESS" in the email.
However Line 250 shows only the 4th result information and the preceding action email is for only the 4th result.
So, I figured out a majority of the issues... It was figuring out that 10 was the default result size (dummy me)... Then the issue where it was only getting my 4th given result was because of the compare item it was hitting.
I guess my next question is there a way to do a Wildcard in the Condition field of a Watcher event?
I tried the array_compare and it looks like it may work! However, I am curious...
From what I can tell with the array_compare is that if ONE of the items in the array is true then it would list the comparison as true. Even for the items in the array that are not true....
In the simulation results under the comparison it shows each of the 10 items I am trying to compare and see if it is greater than 100000. My guess is that because one of them meets the requirements it lists all of them... However, I only want the ones that met it to be listed.
the condition is only about returning true or false in order to continue to the actions. If you only want to process the buckets exceeding a certain threshold, you need to have another transform in the action and prepare your data there as needed.
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.