logstash-plugins / logstash-filter-dns

Apache License 2.0
7 stars 28 forks source link

Reverse: Stop processing on first error when processing an array #5

Open wiibaa opened 9 years ago

wiibaa commented 9 years ago

Moved from LOGSTASH-2103 Using the DNS filter reverse with an array I noticed subsequent elements will only be resolved if the ones before it succeed. E.g. Config:

dns {
 reverse => [ "src", "dst"]
}

WORKS

input = {"src":"8.8.8.8","dst":"169.0.0.1"}
output = {"src":["8.8.8.8","google-public-dns-a.google.com"],"dst":"169.0.0.1"}

FAILS

input = {"src":"169.0.0.1","dst":"8.8.8.8"}
output = {"src":"169.0.0.1","dst":"8.8.8.8"}
expected output = {"src":"169.0.0.1","dst":["8.8.8.8","google-public-dns-a.google.com"]}

I suppose the return should be replace by continue within the reverse() method

pemontto commented 8 years ago

:+1:

pemontto commented 7 years ago

Would still be good to get this one fixed

pemontto commented 7 years ago

Would be great if this could be fixed. I use the failed and hit cache and am pretty sure they're not shared across filters which would be far more efficient if this was in place.