Hello,
I'm trying to setup a bit of a dynamic solution to the logstash config, and especially the json filter part. When setting the json part, I need to provide a source and a target fields. With source it's easy, however, the target field should be a bit dynamic, i.e in my case, based on another field value. For example, I have a nested field [kubernetes][container][name], and the following json configuration:
json {
source => "message"
target => "message_json_%{[kubernetes][container][name]}"
skip_on_invalid_json => true
}
As you can see, I'm trying to append the nested value to the string in the target, however, it seems that no matter how I will mutate my target, it's always results in errors.
Can someone please help me figure this one out?
Thanks in advance!