Hi, I want to write a parser extension to capture additional fields from a json log that looks like:
{ "key": "value", ... "ExperimentalFeatures": { "mcp": false }, ... "key": "value"}
I’m imagining the UDM field based on the above to look like:
additional.fields["mcp"] = "false"
So far I’ve come up with:
filter { # Additional Fields Mapping (ExperimentalFeatures.mcp) mutate { replace => { "ExperimentalFeatures.mcp" => "" } } if [ExperimentalFeatures][mcp] != "" and [ExperimentalFeatures][mcp] != "NULLPLACEHOLDERVALUE" { mutate { add_field => { "[@metadata][mcp_val]" => "%{[ExperimentalFeatures][mcp]}" } } mutate { add_field => { "event.idm.read_only_udm.additional.fields[key]" => "mcp" "event.idm.read_only_udm.additional.fields[value]" => "%{[@metadata][mcp_val]}" } } }}
However something about the above isn’t right because json logs that contain the above key:value pairs are not getting such UDM fields. Is anyone able to point me in the right direction?

