Hi
Within the Kubernetes Node parser, I am trying to split the textPayload into separate fields. The textPayload field contains long text which we're trying to extract and split the field into a key then the output of the field to a value. An example of a raw log (data nullified):
"textPayload": "time\\u003d\\"0000-00-00T00:00:00.0000000Z\\" type\\u003d\\"container_app_firewall_audit\\" container_name\\u003d\\"container-name-here\\" image_name\\u003d\\"image-name/here:latest\\"
How can I assign lets say for example time and type to its own separate UDM field OR automatically add an array with key and value pairs? I've configured extension parser as shown below here, however it's not splitting the values by spaces.
filter{
mutate {
replace => {
"textPayload" => ""
}
}
if [textPayload] != ""
{
mutate {
split => {
source => "textPayload"
separator => " "
target => "textPayload_array"
}
}
mutate {
merge => {
"event.idm.read_only_udm.target.description" => "textPayload_array"
}
}
mutate {
merge => {
"@output" => "event"
}
}
}
statedump {
label => "foo"
}
}
