Parsleaf

Google SecOps parser errors

CSV parser runs but every line is GENERIC_EVENT

The csv step or the column copy is failing silently. SecOps csv has no columns option, and rename onto a field you initialised fails. Use column1…columnN and copy each with replace.

The error

metadata.event_type "GENERIC_EVENT" with the whole CSV line in metadata.description and the ingestion time as metadata.event_timestamp (no error shown)

Why it happens

SecOps csv takes only source, separator and on_error, and always writes column1 … columnN. A Logstash-style columns => [...] list is not how it works.

Blanking placeholders such as - before csv can leave columns that are never created, so steps that reference them fail.

mutate { rename => { "column1" => "dt_date" } } fails when dt_date already exists, and it does exist if you initialised it at the top (which you should, to avoid "not found in state data"). With on_error the failure is silent: dt_date stays empty, your date check fails and the line falls back to GENERIC_EVENT.

Putting many renames in one mutate makes it worse: one failure stops the whole block.

How to fix it

Fails:

mutate { replace => { "dt_date" => "" "c_ip" => "" } }
mutate { gsub => ["message", ",-,", ",,"] }
csv { source => "message" separator => "," columns => ["dt_date", "dt_time", "c_ip"] on_error => "csv_failed" }

Works:

mutate { replace => { "dt_date" => "" "c_ip" => "" } }
csv { source => "message" separator => "," on_error => "csv_failed" }
if ![csv_failed] {
  mutate { replace => { "dt_date" => "%{column1}" } on_error => "col1_failed" }
  mutate { replace => { "c_ip" => "%{column7}" } on_error => "col7_failed" }
}
if [c_ip] != "" and [c_ip] != "-" {
  # map it
}

Still failing?

One error usually hides the next. Parsleaf writes the full parser from your sample logs and keeps fixing it from the errors your SecOps tenant returns, until it passes. Generate your parser: the first one is free.

Other parser errors