# How to send what you want in filebeat

**URL:** <https://discuss.elastic.co/t/how-to-send-what-you-want-in-filebeat/288064>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [October 30, 2021, 1:49pm UTC](https://discuss.elastic.co/t/how-to-send-what-you-want-in-filebeat/288064 "2021-10-30T13:49:35Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![root\_linux](https://avatars.discourse-cdn.com/v4/letter/r/8edcca/32.png) [@root\_linux](https://discuss.elastic.co/u/root_linux)\
**Post date:** [October 30, 2021, 1:49pm UTC](https://discuss.elastic.co/t/how-to-send-what-you-want-in-filebeat/288064/1 "2021-10-30T13:49:35Z")

</div>

How can I send only those lines which i want from filebeat to logstash

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [October 30, 2021, 2:57pm UTC](https://discuss.elastic.co/t/how-to-send-what-you-want-in-filebeat/288064/2 "2021-10-30T14:57:22Z")

</div>

You need to define a pattern to match the lines you want to send using the `include_lines`.

Here is the [documentation](https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-input-log.html#filebeat-input-log-include-lines) about how to do it.

---

<div class="post-metadata">

**Author:** ![root\_linux](https://avatars.discourse-cdn.com/v4/letter/r/8edcca/32.png) [@root\_linux](https://discuss.elastic.co/u/root_linux)\
**Post date:** [October 30, 2021, 3:54pm UTC](https://discuss.elastic.co/t/how-to-send-what-you-want-in-filebeat/288064/3 "2021-10-30T15:54:20Z")

</div>

I tried include\_lines, it worked well when i tried one filter. But i want multiple filter and if i give same way as given in filebeat.yml file by default. Then it did not worked. It only filters first term.

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [October 31, 2021, 3:27pm UTC](https://discuss.elastic.co/t/how-to-send-what-you-want-in-filebeat/288064/4 "2021-10-31T15:27:12Z")

</div>

The `include_lines` is a list of regular expressions, if you want to filter on more than one expression you will need to add an item to that list.

```auto
include_lines: ['EXP1', 'EXP2', 'EXP3', 'EXPN']

```

How are you trying to do? Please share your configuration using the Preformatted text option, the `</>` button.

---

<div class="post-metadata">

**Author:** ![root\_linux](https://avatars.discourse-cdn.com/v4/letter/r/8edcca/32.png) [@root\_linux](https://discuss.elastic.co/u/root_linux)\
**Post date:** [November 1, 2021, 4:39am UTC](https://discuss.elastic.co/t/how-to-send-what-you-want-in-filebeat/288064/5 "2021-11-01T04:39:23Z")

</div>

Now its working for me, thanks for your response @leandrojmp

---

<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 29, 2021, 6:39am UTC](https://discuss.elastic.co/t/how-to-send-what-you-want-in-filebeat/288064/6 "2021-11-29T06:39:24Z")

</div>

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