# Filebeat: how to pass file properties to Logstash?

**URL:** <https://discuss.elastic.co/t/filebeat-how-to-pass-file-properties-to-logstash/108289>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [November 19, 2017, 3:08pm UTC](https://discuss.elastic.co/t/filebeat-how-to-pass-file-properties-to-logstash/108289 "2017-11-19T15:08:29Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Asaf\_Shabat](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/asaf_shabat/32/24442_2.png) [@Asaf\_Shabat](https://discuss.elastic.co/u/Asaf_Shabat)\
**Post date:** [November 19, 2017, 3:08pm UTC](https://discuss.elastic.co/t/filebeat-how-to-pass-file-properties-to-logstash/108289/1 "2017-11-19T15:08:29Z")

</div>

Hello,

How can I read a file property (file.log) which holds a key value, for example:  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/d/2/d2beec3232b4cc830ac11b2dd70fd5f6e0bf56d6.png)

I want to pass the "user.comment" value to Logstash via Filebeat and to show it inside Kibana.

Thanks!

---

<div class="post-metadata">

**Author:** ![ruflin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ruflin/32/3116_2.png) [@ruflin](https://discuss.elastic.co/u/ruflin)\
**Post date:** [November 20, 2017, 4:54am UTC](https://discuss.elastic.co/t/filebeat-how-to-pass-file-properties-to-logstash/108289/2 "2017-11-20T04:54:08Z")

</div>

Currently filebeat does not support this feature.

Can you share some more background on your use case?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [November 20, 2017, 6:02am UTC](https://discuss.elastic.co/t/filebeat-how-to-pass-file-properties-to-logstash/108289/3 "2017-11-20T06:02:05Z")

</div>

Please don't post pictures of text in future, they are difficult to read and some people may not be even able to see them 🙂

---

<div class="post-metadata">

**Author:** ![Asaf\_Shabat](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/asaf_shabat/32/24442_2.png) [@Asaf\_Shabat](https://discuss.elastic.co/u/Asaf_Shabat)\
**Post date:** [November 20, 2017, 7:29am UTC](https://discuss.elastic.co/t/filebeat-how-to-pass-file-properties-to-logstash/108289/4 "2017-11-20T07:29:59Z")

</div>

I wanted to show you the attributes right from the console.

---

<div class="post-metadata">

**Author:** ![Asaf\_Shabat](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/asaf_shabat/32/24442_2.png) [@Asaf\_Shabat](https://discuss.elastic.co/u/Asaf_Shabat)\
**Post date:** [November 20, 2017, 7:44am UTC](https://discuss.elastic.co/t/filebeat-how-to-pass-file-properties-to-logstash/108289/5 "2017-11-20T07:44:22Z")

</div>

Alright,

I have many devices around the world who needs to send their logs data (which means log file with metadata) to Filebeat and it sends it to Logstash -\> ElasticSearch -\> Kibana.  
The log files have some Metadata (as you've seen in the picture attached).

My goal is to get the metadata from the log files and send it to Logstash.

If you ask why should I need this ability?  
Let's say that I receive a log file with 30,000 rows and I want to add an additional data to the log files without adding it into each row in the file (for example a device ID). It's not efficient to add the device ID into each row, so the proper solution is to add it to the file metadata.

I'm sure that Filebeat has the ability to read a file metadata and send it to Logstash, it should be called file enrichment.

---

<div class="post-metadata">

**Author:** ![ruflin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ruflin/32/3116_2.png) [@ruflin](https://discuss.elastic.co/u/ruflin)\
**Post date:** [November 21, 2017, 10:45pm UTC](https://discuss.elastic.co/t/filebeat-how-to-pass-file-properties-to-logstash/108289/6 "2017-11-21T22:45:34Z")

</div>

Instead of storing the information in the file itself, you could store the "meta" information in the filebeat config for the file as a workaround.

The meta data enrichment on the filebeat side could be done through a processor. We already have processors to enrich events with meta information from docker for example.

---

<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:** [December 19, 2017, 10:45pm UTC](https://discuss.elastic.co/t/filebeat-how-to-pass-file-properties-to-logstash/108289/7 "2017-12-19T22:45:34Z")

</div>

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