Kafka output topic_id

I try to use this plugin
output {

                            bootstrap_servers => "dal-b-23971:29090,dal-b-23971:29091,dal-b-23971:29092"
                            topic_id => " **_%{[fields][app_id]}_** "
                            codec => plain {
                                    format => "%{message}"


i would like to take the string into this variable : %{[fields][app_id]}

I'm not sure what you mean.

Do you have a value in the field [fields][app_id] or are you looking to put a value into that field before the event get to the output stage?

When using interpolation, if the field does not exist the the text "[fields][app_id]" is returned by the %{} interpolation operation so your topic_id ends up being **_[fields][app_id]_** with a space at either end.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.