Linux: Logstash
- TAGS: Log
调试
a.conf
input { file { path => ["/root/.jasper/logstash-8.14.1/b.txt"] type => "system" start_position => "beginning" } } filter { mutate{ add_field => { "index_name" => "%{[@metadata][kafka][topic]}"} } #mutate { # rename => { "log" => "log_info" } #} json { source => "message" } json { source => "log" target => "log" } mutate{ add_field => { "haa" => "%{[log_kafka_topic]}"} } #if [kafka_topic] != "server-exception-dialog" { #json { # source => "message" #} #mutate { # remove_field => ["message"] #}} } output{stdout{codec=>rubydebug}}
命令
[root@proxy logstash-8.14.1]# bin/logstash -f a.conf