# Filebeat running a .bat file

**URL:** <https://discuss.elastic.co/t/filebeat-running-a-bat-file/143092>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [August 6, 2018, 5:41am UTC](https://discuss.elastic.co/t/filebeat-running-a-bat-file/143092 "2018-08-06T05:41:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Priyaranjan\_Mudliar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/priyaranjan_mudliar/32/33726_2.png) [@Priyaranjan\_Mudliar](https://discuss.elastic.co/u/Priyaranjan_Mudliar)\
**Post date:** [August 6, 2018, 5:41am UTC](https://discuss.elastic.co/t/filebeat-running-a-bat-file/143092/1 "2018-08-06T05:41:42Z")

</div>

Can i somehow execute a bat file if my filebeat gets a log line which has a string "Error" in it ? Or can i output only those log lines to elasticsearch which has a string "Error"?

Please help me on this one...

---

<div class="post-metadata">

**Author:** ![chandra0651](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chandra0651/32/30484_2.png) [@chandra0651](https://discuss.elastic.co/u/chandra0651)\
**Post date:** [August 7, 2018, 5:27pm UTC](https://discuss.elastic.co/t/filebeat-running-a-bat-file/143092/2 "2018-08-07T17:27:44Z")

</div>

Using some thing like below in your filebeat prospector. This will exclude the lines which have Debug and Info and add what ever level like WARN , this should do the trick

- type: log  
enabled: true  
paths:
  - /logfilepath  
exclude\_lines: ['._?(DEBUG|INFO)._']

---

<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, 2018, 5:27pm UTC](https://discuss.elastic.co/t/filebeat-running-a-bat-file/143092/3 "2018-09-04T17:27:55Z")

</div>

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