In my project I run logstash as service.But it gives following error.
how to correct this
[2018-03-28T07:03:03,652][ERROR][logstash.agent ] Pipeline aborted due to error {:exception=>#<Grok::PatternError: pattern %{VAMPS_ACCESS_LOG} not defined>, :backtrace=>["/usr/share/logstash/vendor/bundle/jruby/1.9/gems/jls-grok-0.11.4/lib/grok-pure.rb:123:in compile'", "org/jruby/RubyKernel.java:1479:in
loop'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/jls-grok-0.11.4/lib/grok-pure.rb:93:in compile'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-filter-grok-4.0.2/lib/logstash/filters/grok.rb:281:in
register'", "org/jruby/RubyArray.java:1613:in each'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-filter-grok-4.0.2/lib/logstash/filters/grok.rb:275:in
register'", "org/jruby/RubyHash.java:1342:in each'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-filter-grok-4.0.2/lib/logstash/filters/grok.rb:270:in
register'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:290:in register_plugin'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:301:in
register_plugins'", "org/jruby/RubyArray.java:1613:in each'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:301:in
register_plugins'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:311:in start_workers'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:235:in
run'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:408:in `start_pipeline'"]}
The log tells you the exact problem:
In your Logstash Grok filter you are referring to a custom pattern you haven't defined.
You need to tell Grok filter the directory where it can find the custom patterns. The property is called patterns_dir
. See here.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.