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.
The error
panic encountered: non-signed-integral type given for backstory.Noun.port: string "389"Why it happens
principal.port, target.port, src.port and similar fields are integers in UDM.
mutate replace only works with strings. If you replace with "%{port}", the UDM gets the string "389" and the conversion panics.
If you convert to integer first and then use replace, you get the opposite error: source field value must be a string.
How to fix it
- Strip anything that is not a digit (vendors write things like "389(ldap)").
- Convert the temp field to integer, then use rename to move it into the UDM path. rename keeps the type; replace does not.
Fails:
mutate {
replace => { "event.idm.read_only_udm.target.port" => "%{dst_port}" }
}Works:
if [dst_port] != "" {
mutate { gsub => ["dst_port", "[^0-9]", ""] }
mutate {
convert => { "dst_port" => "integer" }
on_error => "dst_port_not_int"
}
if ![dst_port_not_int] {
mutate {
rename => { "dst_port" => "event.idm.read_only_udm.target.port" }
}
}
}Where people usually hit it
target.port, principal.port, src.port, network.sent_bytes, network.received_bytes
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.