# Pattern matching filebeat to logstash

**URL:** <https://discuss.elastic.co/t/pattern-matching-filebeat-to-logstash/194268>\
**Category:** Logstash\
**Created:** [August 7, 2019, 3:03pm UTC](https://discuss.elastic.co/t/pattern-matching-filebeat-to-logstash/194268 "2019-08-07T15:03:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rovaldy\_Applyrs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rovaldy_applyrs/32/47522_2.png) [@Rovaldy\_Applyrs](https://discuss.elastic.co/u/Rovaldy_Applyrs)\
**Post date:** [August 7, 2019, 3:03pm UTC](https://discuss.elastic.co/t/pattern-matching-filebeat-to-logstash/194268/1 "2019-08-07T15:03:05Z")

</div>

I wanted to know if it is possible to pattern match the path of the files coming in from file beat in log stash? I am trying to extract the path but it did not work.

I tried something like this

input {  
beats {  
port =\> 5044  
}  
}

filter {  
grok {  
match =\> {  
"path" =\> "%{GREEDYDATA}%{SYSTEM:system}\_%{LOG:log}%{GREEDYDATA}"  
}  
}  
}

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [August 7, 2019, 3:21pm UTC](https://discuss.elastic.co/t/pattern-matching-filebeat-to-logstash/194268/2 "2019-08-07T15:21:41Z")

</div>

SYSTEM is not a built-in pattern. What does the field look like and which parts of it do you want to extract?

---

<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 4, 2019, 3:21pm UTC](https://discuss.elastic.co/t/pattern-matching-filebeat-to-logstash/194268/3 "2019-09-04T15:21:42Z")

</div>

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