Is there a way to send the path as a parameter to the the filebeat.yml configuration file?


(Nisal Thiwanka) #1

I have configured filebeat to read different log files from several paths and I need to configure filebeat in a way that I can send path as a parameter to the configuration file. Is it possible?


(Carlos PĂ©rez Aradros) #2

Hi,

Could you explain a little what's your use case? What info will you get from the path, how are your files organized? It seems to be a common request.

You can solve this with a grok processor, both from ingest node https://www.elastic.co/guide/en/elasticsearch/reference/master/grok-processor.html or logstash https://www.elastic.co/guide/en/logstash/current/plugins-filters-grok.html

Best regards


(Nisal Thiwanka) #3

I'm using filebeat to read log files from 6 different locations. And I configured those file paths in the filebeat.yml. And what I need to accomplish is that when I request filebeat to read a specific log among those 6 logs it has to read that log only. So how can I make such request to filebeat?
Thanks in advance..!


(ruflin) #4

That is not what filebeat was designed for but I think you could "emulate" such a behaviour with the reloading feature. https://www.elastic.co/guide/en/beats/filebeat/5.4/filebeat-configuration-reloading.html


(system) #5

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