logstash
遇到的问题:
[2024-05-14T15:23:17,530][INFO ][logstash.runner ] Logstash shut down. [2024-05-14T15:23:17,534][FATAL][org.logstash.Logstash ] Logstash stopped processing because of an error: (SystemExit) exit org.jruby.exceptions.SystemExit: (SystemExit) exit at org.jruby.RubyKernel.exit(org/jruby/RubyKernel.java:808) ~[jruby.jar:?] at org.jruby.RubyKernel.exit(org/jruby/RubyKernel.java:767) ~[jruby.jar:?] at root.install.logstash_minus_8_dot_13_dot_4.lib.bootstrap.environment.<main>(/root/install/logstash-8.13.4/lib/bootstrap/environment.rb:90) ~[?:?] ^C
原因:配置文件语法错误。比如:
环境:
配置:
input { beats { port=>5044 codec=>plain{ charset=>"UTF-8" } } } filter { mutate { remove_field => ["host","input","@timestamp","ecs","tags","agent","@version","event"] } } output { if [log][file][path] == "/root/projects/blade-gateway/log/blade-gateway-nohup.log" { file { path => "/root/blade-gateway-nohup.log" } } if [log][file][path] == "/root/projects/blade-resource/log/blade-resource-nohup.log" { file { path => "/root/blade-resource-nohup.log" codec => line { format => "custom format: %{message}"} } } }