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.
The error
LOG_PARSING_CBN_ERROR: "generic::invalid_argument: failed to convert raw output to events: failed to convert raw message 0: field \"idm\": index 0: recursive rawDataToProto failed: field \"read_only_udm\": index 0: recursive rawDataToProto failed: field \"principal\": index 0: recursive rawDataToProto failed: field \"ip\": failed to make strategy: received non-slice or non-array raw output for repeated field"Why it happens
Some UDM fields are repeated: they hold a list, not a single value. principal.ip, target.ip, src.ip, observer.ip, security_result, security_result.action, security_result.category and additional.fields are the usual ones.
mutate replace always writes a single string. When SecOps converts the output to UDM, it finds a string where it expects a list, and the whole event fails.
How to fix it
- Keep the value in a temporary field, then merge it into the UDM path.
- merge takes the field's name ("src_ip"), not its value ("%{src_ip}"). Passing "%{src_ip}" is the second most common mistake here.
- For a repeated object such as security_result, build the object in a temp field first, then merge the whole object once.
Fails:
mutate {
replace => { "event.idm.read_only_udm.principal.ip" => "%{src_ip}" }
}Works:
if [src_ip] != "" {
mutate {
merge => { "event.idm.read_only_udm.principal.ip" => "src_ip" }
on_error => "src_ip_merge_failed"
}
}
# repeated object: build it, then merge it once
mutate {
replace => { "sr.action" => "BLOCK" "sr.severity" => "HIGH" }
}
mutate {
merge => { "event.idm.read_only_udm.security_result" => "sr" }
}Where people usually hit it
principal.ip, target.ip, src.ip, observer.ip, security_result, security_result.action, additional.fields
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.