# Shipping whole file as message?

**URL:** <https://discuss.elastic.co/t/shipping-whole-file-as-message/94609>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [July 26, 2017, 9:57am UTC](https://discuss.elastic.co/t/shipping-whole-file-as-message/94609 "2017-07-26T09:57:49Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![MarcusCaepio](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marcuscaepio/32/32458_2.png) [@MarcusCaepio](https://discuss.elastic.co/u/MarcusCaepio)\
**Post date:** [July 28, 2017, 4:26am UTC](https://discuss.elastic.co/t/shipping-whole-file-as-message/94609/4 "2017-07-28T04:26:33Z")

</div>

I guess I have a solution.  
I don't have to detect the last line. Seems for me, that filebeat detects it itself. Only have to be sure to start at first line and put everything on it.  
filebeat.yml

```
filebeat.prospectors: 
- input_type: log
      paths:
        - /X/Y/*/*
      multiline.pattern: ' \A.*'
      multiline.negate: true
      multiline.match: after
      tags: ["my-tag"]
```

---

_[View the full topic](https://discuss.elastic.co/t/shipping-whole-file-as-message/94609)._
