我想使用以下设置启动一个 logstash 实例:
input {
kafka {
topic_id => "topic_a"
.......
}
kafka {
topic_id => "topic_b"
.......
}
}
filter {
json {
source => "message"
}
uuid {
target => "@uuid"
}
mutate {
replace => { "message" => "%{message}" } # want to get the full json literal but does not work
add_field => {
"topic" => "%{topic_id}" # it does not work either
}
}
# logic to apply different filter base on topic_id
if [topic_id] …Run Code Online (Sandbox Code Playgroud) logstash ×1