Drollery Medieval drollery of a knight on a horse

🏆 欢迎来到本站: https://xuchangwei.com/希望这里有你感兴趣的内容

flowery border with man falling
flowery border with man falling

Linux: Logstash

调试

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