Filebeat: how to pass file properties to Logstash?


How can I read a file property (file.log) which holds a key value, for example:

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


Currently filebeat does not support this feature.

Can you share some more background on your use case?

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 :slight_smile:

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


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.

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.

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