Hi,
I want to drop the logs based on multiple fields.
Below is the content of drop.yml
logstash : '{"info": "drop"}'
e.g. I want to drop the loglines which has contain the "component" : "logstash" and "severity": "info"
I want to do this dynamically.
translate {
field => "component"
destination => "logstat"
dictionary_path => "/tmp/drop.yml"
}
json {
source => "logstat"
target => "severity"
}
if [target] == "drop" {
drop { }
}
The input logline:
{"nodetype":"haproxy","ssinst":"001","component":"logstash","severity":"info","logsource":"log"}
{"nodetype":"haproxy","ssinst":"001","component":"logstash","severity":"debug","logsource":"log"}
{"nodetype":"haproxy","ssinst":"001","component":"logstash","severity":"error","logsource":"log"}
{"nodetype":"haproxy","ssinst":"001","component":"kafka","severity":"error","logsource":"log"}
{"nodetype":"haproxy","ssinst":"001","component":"logstash","logsource":"log"}