HI @gslulu
I’ve tried your example message and pipeline rule and everything worked correctly.
I think, that your problem is not with KV pipeline function, but field level. It contains string unknown, but graylog by default uses numeric value in this field, so it’s collide with it. So either rename field in pipeline rule from level to something different or use own index for kubernetes.
rule "kv kuberneter"
when
has_field("message")
then
set_fields(
fields:
key_value(
value: to_string($message.message),
delimiters: "\t",
kv_delimiters:":",
ignore_empty_values: true)
);
rename_field("level", "level_k11s");
end
You hit the bull’s eye…Awesome.
I’m going with just changing the field name.
But, one question… how would I know which fields definition is my index using? I only see a configuration for ‘Field type refresh interval’.
Since I was not able to remove a key from the Map and rename_field was not working to eliminate the level:unknown entry from the map, I ended up doing something like below: