Google SecOps parser errors, explained
The errors below come up again and again when writing Google SecOps (Chronicle) CBN parsers and parser extensions. Each page has the error text as SecOps prints it, why it happens, and a fix you can paste.
Find yours with your browser's search (Ctrl+F / Cmd+F) using a few words from the error, such as repeated field or not found in state data.
received non-slice or non-array raw output for repeated field
The UDM field is a list (principal.ip, target.ip, security_result.action…). Use merge with the temp field's name instead of replace.non-signed-integral type given for backstory.Noun.port
Ports are integers in UDM. Clean the value, convert it to integer, then rename it into the UDM field; replace only writes strings.received non-string raw output for enum field
Enum fields (event_type, severity, action, ip_protocol…) need one plain string that exactly matches an allowed value. Map vendor values with if/else.UDM.metadata not present
The event that reached @output has no metadata.event_type. Usually a typo in the event path, a different prefix than the one you merge, or a branch that never ran.udm validation failed: principal field is not set
The event_type you chose requires principal (or target) fields you did not fill. Populate them, or pick an event type that matches the data you have.field "…": no descriptor found
The UDM path you wrote does not exist. Check the spelling against the UDM field list; the field named in the error is the wrong one."…" not found in state data
You referenced a field that does not exist for this log line. Initialise every temp field at the top, and guard JSON keys that are not always present.field "…" already exists in data and is not overwriteable
Grok refuses to write into a field that already exists. List the field in grok's overwrite option.merge source field "event" must not be empty
You merged event into @output when nothing under event was set. Common in parser extensions whose condition did not match this log.invalid JSON: cannot unmarshal array into Go value of type map
The log is a JSON array, not a JSON object. Wrap it in an object first, then parse it with array_function.error parsing regexp (grok works in a debugger, fails in SecOps)
SecOps grok uses Go's RE2 engine. Lookarounds, backreferences, possessive and atomic groups are not supported, and backslashes need escaping in the parser file.raw output is not []interface{}, instead is: string
@output must be a list of events. Merge the event object into @output; do not replace it, and do not use %{event}.non-string given for backstory.Noun.ip
You converted the IP with convert => ipaddress before merging it. That turns it into bytes; *.ip fields only take the plain string. Validate the IP with a pattern and merge the original value.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.
Fixing errors one at a time is slow
Parsleaf reads your sample logs, writes the whole parser, and keeps fixing it from the errors your SecOps tenant returns until it passes. Try it on your log source: the first parser is free.