So I have a problem
This is a sample log which I want to be dropped. So if the [message] contains
<13>Feb 8 17:53:21 10.45.1.9 CEF:0|ArcSight|ArcSight|8.4.3.9181.0|agent:045|File processing ended: Success|Low| eventId=72362662 start=1739017401162 end=1739017401162 mrt=1739017401162
so if the [message] contains agent:045 or agent:044, I want the whole log to be dropped.
How can I do this?
This is my parser :
filter {
mutate {
replace => {
"src" => ""
"dhost" => ""
"src_present" => "false"
"dhost_present" => "false"
"status" => ""
"event.idm.read_only_udm.metadata.vendor_name" => "Indusface"
"event.idm.read_only_udm.metadata.product_name" => "WAF"
"event.idm.read_only_udm.metadata.event_type" => "GENERIC_EVENT"
}
}
grok {
match => {
"message" => ["CEF:%{GREEDYDATA}src=%{IP:src}"]
}
overwrite => ["src"]
on_error => "src_extraction_failed"
}
grok {
match => {
"message" => ["cs4=%{HOSTNAME:dhost}"]
}
overwrite => ["dhost"]
on_error => "dhost_extraction_failed"
}
if [src] not in ["", "null", "None"] {
mutate {
replace => {
"src_present" => "true"
}
}
mutate {
merge => {
"event.idm.read_only_udm.principal.ip" => "src"
}
on_error => "principal_ip_not_set"
}
}
if [dhost] not in ["", "null", "None"] {
mutate {
replace => {
"dhost_present" => "true"
}
}
mutate {
replace => {
"event.idm.read_only_udm.target.hostname" => "%{dhost}"
}
on_error => "destinationHost_label_empty"
}
}
if [event][idm][read_only_udm][metadata][event_type] == "GENERIC_EVENT" {
if [src_present] != "false" and[dhost_present] != "false" {
mutate {
replace => {
"event.idm.read_only_udm.metadata.event_type" => "NETWORK_CONNECTION"
}
}
}
}
mutate {
merge => {
"@output" => "event"
}
}
}
can anyone help?
@bsalvatore ?