So firewall pushing logs towards logstash server in logstash i have mentioned in the output plugin to the destination server i need to filter my logs if for example:192.168.1.143 contains the ip in the message i need to push only this log to the destination server i will mention my sample log here and also my conf file please help with this query
this is my sample log receiving from our firewall
2023-08-10T12:21:51+05:30 192.168.1.214 filterlog: 9,,,1000102433,vmx0,match,block,in,4,0x0,,64,60685,0,DF,1,icmp,84,192.168.1.143,192.168.1.214,request,38727,164
And this the conf file in logstash
input {
syslog {
port => "8514"
}
}
filter {
grok {
match => { "message" => %{TIMESTAMP_ISO8601:timestamp} %{IP:source_ip} %{WORD:program}: %{NUMBER:rule_number},%{DATA:sub_rulenumber},%{DATA:anchor},%{NUMBER:tracker},%{DATA:real_interface},%{DATA:reason1},%{DATA:action},%{DATA:direction},%{DATA:ip_version},%{DATA:flags},%{DATA:empty},%{DATA:size},%{NUMBER:id},%{NUMBER:sequence},%{DATA:reason},%{NUMBER:ttl},%{DATA:protocol_name},%{NUMBER:sourceport},%{IP:source},%{IP:destination_ip},%{NUMBER:source_port},%{NUMBER:destination_port},%{NUMBER:connection_id}" }
}
if [source] == "192.168.1.143" {
} else {
drop {}
}
}
}
output {
syslog {
host => "192.168.1.160"
port => "514"
}
}