# Filebeat custom patterns

**URL:** <https://discuss.elastic.co/t/filebeat-custom-patterns/243662>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [August 4, 2020, 7:45am UTC](https://discuss.elastic.co/t/filebeat-custom-patterns/243662 "2020-08-04T07:45:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vladtepes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vladtepes/32/64982_2.png) [@vladtepes](https://discuss.elastic.co/u/vladtepes)\
**Post date:** [August 4, 2020, 7:45am UTC](https://discuss.elastic.co/t/filebeat-custom-patterns/243662/1 "2020-08-04T07:45:02Z")

</div>

Greetings friends,

I am trying to make [this approach](https://github.com/Gergues/SharePoint-ELK/blob/master/Logstash/custom_patterns/SharePointLogReaderPatterns) work in ingest pipelines, but have stumbled upon a syntax error.  
The grok pattern is valid from what I have tested:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/d/8/d84fbac9a10dc78bd4881cadfd200822de015d93.png)  
When I try to use it in the ingest pipeline however it shows a **bad string** error. Have you guys tried it or maybe can spot the issue?  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/a/3/a308a2dcdd160d54d53fa1bc3320c00cb23d63f5.png)

---

<div class="post-metadata">

**Author:** ![vladtepes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vladtepes/32/64982_2.png) [@vladtepes](https://discuss.elastic.co/u/vladtepes)\
**Post date:** [August 5, 2020, 1:28pm UTC](https://discuss.elastic.co/t/filebeat-custom-patterns/243662/2 "2020-08-05T13:28:53Z")

</div>

I have also tested all patterns individually and the result is also positive.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/f/0/f0631f73741043d1c2703dc3e3b1332a4b6d7b75.png)

The filter, as I can see finds the **'bad string'** in the first part:  
(?%{MONTHNUM}/%{MONTHDAY}/%{YEAR} %{HOUR}:%{MINUTE}:%{SECOND}\*?\*)%{SPACE}%{PROG:sp\_process} (%{BASE16NUM:sp\_pid})  
If I delete this, then there is no more bad string error.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/4/8/483ab3c24ba238497522717fa25fb3049f0baa05.png)  
Unfortunately my understanding of all the Grok nuances is still infantile. Can somebody maybe spot something not supported by the ingest pipeline?

---

<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:** [September 2, 2020, 3:28pm UTC](https://discuss.elastic.co/t/filebeat-custom-patterns/243662/3 "2020-09-02T15:28:54Z")

</div>

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