Ok thanks for the answer!
If I understand the pipelines correctly, I would have to define a pipline-key-value-extractor for every key in the message, right?
For a quick-win couldn’t I just regex-replace “level” (I don’t really need the field) with another string and then run the k=v extractor?
Ok thanks again.
I think I have to do some more reading.
I changed level to lvl via regexp-replace and afterwards I run the k=v extractor. Works as expected but I will check out the pipeline key_value() functionality.
rule "kv_ex_prefix"
when
has_field("kv")
then
// extract all key-value from "message" and prefix it with kv_
set_fields(
fields:
key_value(
value: to_string($message.message),
trim_value_chars: "\""
),
prefix: "kv_"
);
end