So I wrote a filter to drop any event that has a certain field with a value of null:
filter {
if[type] == "flow" and [packet_source][ip] == "" {
drop { }
}
}
However, this does not work. Does anyone have any idea why? The names of the parameters are correct
Logstash version 5.2
jkuang
(Jimmy Kuang)
February 28, 2017, 8:26pm
2
Please provide the logstash configs and a sample line of data.
Here is what my output looks like, and sometimes the "packet_source.ip" is empty, so I want to drop those packets.
As for my configs, I have the default ones, one set up for input from packetbeat, and that filter in my original post.
jkuang
(Jimmy Kuang)
March 1, 2017, 12:08am
4
Try the following:
filter {
if[type] == "flow" and !([packet_source][ip]) {
drop { }
}
}
system
(system)
Closed
March 29, 2017, 12:08am
5
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.