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

**URL:** <https://discuss.elastic.co/t/is-there-a-way-to-send-the-path-as-a-parameter-to-the-the-filebeat-yml-configuration-file/86389>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [May 19, 2017, 9:15am UTC](https://discuss.elastic.co/t/is-there-a-way-to-send-the-path-as-a-parameter-to-the-the-filebeat-yml-configuration-file/86389 "2017-05-19T09:15:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nisal\_Thiwanka](https://avatars.discourse-cdn.com/v4/letter/n/2acd7d/32.png) [@Nisal\_Thiwanka](https://discuss.elastic.co/u/Nisal_Thiwanka)\
**Post date:** [May 19, 2017, 9:15am UTC](https://discuss.elastic.co/t/is-there-a-way-to-send-the-path-as-a-parameter-to-the-the-filebeat-yml-configuration-file/86389/1 "2017-05-19T09:15:58Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![exekias](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/exekias/32/28718_2.png) [@exekias](https://discuss.elastic.co/u/exekias)\
**Post date:** [May 19, 2017, 9:55am UTC](https://discuss.elastic.co/t/is-there-a-way-to-send-the-path-as-a-parameter-to-the-the-filebeat-yml-configuration-file/86389/2 "2017-05-19T09:55:53Z")

</div>

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](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](https://www.elastic.co/guide/en/logstash/current/plugins-filters-grok.html)

Best regards

---

<div class="post-metadata">

**Author:** ![Nisal\_Thiwanka](https://avatars.discourse-cdn.com/v4/letter/n/2acd7d/32.png) [@Nisal\_Thiwanka](https://discuss.elastic.co/u/Nisal_Thiwanka)\
**Post date:** [May 19, 2017, 11:16am UTC](https://discuss.elastic.co/t/is-there-a-way-to-send-the-path-as-a-parameter-to-the-the-filebeat-yml-configuration-file/86389/3 "2017-05-19T11:16:02Z")

</div>

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..!

---

<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:** [May 22, 2017, 10:51am UTC](https://discuss.elastic.co/t/is-there-a-way-to-send-the-path-as-a-parameter-to-the-the-filebeat-yml-configuration-file/86389/4 "2017-05-22T10:51:09Z")

</div>

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](https://www.elastic.co/guide/en/beats/filebeat/5.4/filebeat-configuration-reloading.html)

---

<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:** [June 19, 2017, 10:51am UTC](https://discuss.elastic.co/t/is-there-a-way-to-send-the-path-as-a-parameter-to-the-the-filebeat-yml-configuration-file/86389/5 "2017-06-19T10:51:11Z")

</div>

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