Hi,
I have a yml file that has input like
"John" : "yes"
In logstash conf file I should check if the incoming event has name as John and if the value of John is "yes" then I should drop the message.
My conf file looks like this:
filter {
translate {
field => "name"
destination => "value"
dictionary_path => "/etc/logstash/conf.d/ssid_status.yml"
}
if [name] == "%{name}" {
if [ "%{name}" => "%{value}" ] == "yes" {
drop { }
}
}
}
But my filter doesnt work. Ideally it should read the yml file and should have the value of John as "yes" and should drop the message
It does not come to the second If condition. How do I evaluate the value of John and drop the message?
Logstash version: 6.x