# Pipeline aborted due to error PatternError.pattern not defined

**URL:** <https://discuss.elastic.co/t/pipeline-aborted-due-to-error-patternerror-pattern-not-defined/125876>\
**Category:** Logstash\
**Created:** [March 28, 2018, 7:05am UTC](https://discuss.elastic.co/t/pipeline-aborted-due-to-error-patternerror-pattern-not-defined/125876 "2018-03-28T07:05:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![SashaAlex](https://avatars.discourse-cdn.com/v4/letter/s/e9a140/32.png) [@SashaAlex](https://discuss.elastic.co/u/SashaAlex)\
**Post date:** [March 28, 2018, 7:05am UTC](https://discuss.elastic.co/t/pipeline-aborted-due-to-error-patternerror-pattern-not-defined/125876/1 "2018-03-28T07:05:42Z")

</div>

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'"]}

---

<div class="post-metadata">

**Author:** ![atira](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/atira/32/28699_2.png) [@atira](https://discuss.elastic.co/u/atira)\
**Post date:** [March 31, 2018, 10:01pm UTC](https://discuss.elastic.co/t/pipeline-aborted-due-to-error-patternerror-pattern-not-defined/125876/2 "2018-03-31T22:01:32Z")

</div>

The log tells you the exact problem:

> [@SashaAlex](#):
>
> Grok::PatternError: pattern %{VAMPS\_ACCESS\_LOG} not defined

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](https://www.elastic.co/guide/en/logstash/current/plugins-filters-grok.html#plugins-filters-grok-patterns_dir).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 28, 2018, 10:01pm UTC](https://discuss.elastic.co/t/pipeline-aborted-due-to-error-patternerror-pattern-not-defined/125876/3 "2018-04-28T22:01:43Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 28, 2018, 10:01pm UTC](https://discuss.elastic.co/t/pipeline-aborted-due-to-error-patternerror-pattern-not-defined/125876/4 "2018-04-28T22:01:45Z")

</div>



---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 4, 2022, 5:18am UTC](https://discuss.elastic.co/t/pipeline-aborted-due-to-error-patternerror-pattern-not-defined/125876/5 "2022-11-04T05:18:32Z")

</div>


