Parsleaf

Google SecOps parser errors

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

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.

Other parser errors