2012-12-05 49 views
0

有誰知道什麼是錯誤?logstash亞軍錯誤

#/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) 
+0

獲得logstash幫助的最好方法是使用郵件列表或IRC頻道,因爲這是活躍社區和專家用戶的駐留地。 –

回答

1

當Logstash無法在任何模式文件中找到該模式時,就會出現該錯誤。
最簡單的修復方法是使用logstash-syslog.conf中的patterns_dir指令作爲過濾器。