After writing a lot of custom parsers and parser extensions, most validation failures I see come down to a handful of mistakes:
-
received non-slice or non-array raw output for repeated field: the field is a list (principal.ip,target.ip,security_result,additional.fields). Usemergewith the temp field's name ("src_ip"), notreplace, and not"%{src_ip}". -
non-signed-integral type given for backstory.Noun.port: ports are integers. Strip non-digits,convertto integer, thenrenameinto the UDM field.replaceonly writes strings. -
UDM.metadata not present: noevent_typereached@output. Usually anevent.id.typo, settingevent1but mergingevent, or a branch that didn't run. SetGENERIC_EVENTas a default at the top. -
principal field is not set: theevent_typeyou picked requires a principal or target machine you didn't fill. Choose the type after mapping, with a fallback. -
"x" not found in state data: you tested a field that doesn't exist for this line. Initialise every temp field with""at the top. -
merge source field "event" must not be empty: common in extensions. Only merge into@outputwhen you actually mapped something.
I wrote up 12 of these with failing and working snippets here: parsleaf.com/errors. Happy to look at anyone's parser if you're stuck.
