Hi i am trying to achieve below
I have two different index and i want to compare two fields values using loop and get result if any of the IP address value matches
for example :-
Index 1: threatintel
fields :- 1. indicator_ip
2. message
3. userid
Index 2: checkpoint
fields:- 1. srcip
2. dstip
using below watch condition i am only able to check only first value, how to use a loop to check all values
And I should mention - you should probably be doing the comparison at the entry level (I assume you're using logstash?) using the translate filter plugin. Then just create a watch to see if there is a match. What I usually do is create a boolean field with the translate plugin, and then just watch for value=true. Much more efficient.
Hi James,
i tried it but it is not comparing all threatintel IP address with all srcip values, it only compare first one.
but i tried this -
"bool": {
"must": [
{
"query_string": {
"query": "indicator:{{#ctx.payload.first.aggregations.srcip.buckets}}{{key}} {{/ctx.payload.first.aggregations.srcip.buckets}}"
}
}
]
}
this works for me but i need to know how shall i print matching values only in action seciton
Thanks James, for guiding me to the right way. i will try to use logstash method also, but your answer helped me to solve some specific problems anyway,
I am really thankful to this forum and you guys, providing great support to community.
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.