gpt4 book ai didi

java - logstash 运行程序错误

转载 作者:太空宇宙 更新时间:2023-11-04 11:27:29 25 4
gpt4 key购买 nike

有人知道什么是错误吗?

  #/usr/java/jre1.7.0/bin/java -cp /home/spatel/logstash logstash.runner agent -f logstash-syslog.conf
Grok::PatternError: pattern %{IPORHOST:device} not defined
compile at /home/spatel/logstash/gems/jls-grok-0.10.7/lib/grok-pure.rb:131
loop at org/jruby/RubyKernel.java:1410
compile at /home/spatel/logstash/gems/jls-grok-0.10.7/lib/grok-pure.rb:91
compile at /home/spatel/logstash/gems/jls-grok-0.10.7/lib/grok/pure/pile.rb:51
register at /home/spatel/logstash/logstash/filters/grok.rb:142
each at org/jruby/RubyArray.java:1615
register at /home/spatel/logstash/logstash/filters/grok.rb:140
each at org/jruby/RubyHash.java:1186
register at /home/spatel/logstash/logstash/filters/grok.rb:126
run_with_config at /home/spatel/logstash/logstash/agent.rb:415
run_with_config at /home/spatel/logstash/logstash/agent.rb:414
each at org/jruby/RubyArray.java:1615
run_with_config at /home/spatel/logstash/logstash/agent.rb:412
run_with_config at /home/spatel/logstash/logstash/agent.rb:369
run at /home/spatel/logstash/logstash/agent.rb:318
Exception in thread "LogStash::Runner" org.jruby.exceptions.RaiseException: (SystemExit) pattern %{IPORHOST:device} not defined
at org.jruby.RubyIO.write(org/jruby/RubyIO.java:1361)
at org.jruby.RubyIO.write(org/jruby/RubyIO.java:2342)
at org.jruby.RubyIO.puts(org/jruby/RubyIO.java:2297)
at org.jruby.RubyIO.puts(org/jruby/RubyIO.java:2289)
at logstash.runner.main(logstash/runner.rb:42)
at org.jruby.RubyArray.each(org/jruby/RubyArray.java:1615)
at logstash.runner.main(logstash/runner.rb:41)
at logstash.runner.(root)(logstash/runner.rb:120)

最佳答案

当 Logstash 在其任何模式文件中找不到该模式时,您会收到该错误。
最简单的解决方法是在 logstash-syslog.conf 中为您的过滤器使用 patterns_dir 指令。

关于java - logstash 运行程序错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13732545/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com