sip = 1.1.1.1 dip = 2.2.2.2 sport = 100 dport = 200 action = permit
sip = 1.1.1.1 dip = 2.2.2.2 sport = 100 dport = 200 attack = 10.10.10.10
sip = 1.1.1.1 dip = 2.2.2.2 attack = 10.10.10.10
이런 로그를 처리하려면 필터 설정이 복잡해지게 마련.
filter {
if "action" in [message] {
dissect { mapping => { "message" => "sip = %{sip} dip = %{dip} sport = %{sport} dport = %{dport} action = %{action}" } }
} else if "port" in [message] and "attack" in [message] {
dissect { mapping => { "message" => "sip = %{sip} dip = %{dip} sport = %{sport} dport = %{dport} attack = %{atack}" } }
} else {
dissect { mapping => { "message" => "sip = %{sip} dip = %{dip} attack = %{attack}" } }
}
}