# Is there a way to change the filebeat.prospectors paths from command line?

**URL:** <https://discuss.elastic.co/t/is-there-a-way-to-change-the-filebeat-prospectors-paths-from-command-line/93015>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [July 13, 2017, 1:23pm UTC](https://discuss.elastic.co/t/is-there-a-way-to-change-the-filebeat-prospectors-paths-from-command-line/93015 "2017-07-13T13:23:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Truesight](https://avatars.discourse-cdn.com/v4/letter/t/d26b3c/32.png) [@Truesight](https://discuss.elastic.co/u/Truesight)\
**Post date:** [July 13, 2017, 1:23pm UTC](https://discuss.elastic.co/t/is-there-a-way-to-change-the-filebeat-prospectors-paths-from-command-line/93015/1 "2017-07-13T13:23:06Z")

</div>

Hello, i am fairly new to Filebeat and would like to do change the filebeat.yml entry  
"- input\_type: log

# Paths that should be crawled and fetched. Glob based paths.

paths:  
- D:\whatever\here.log

" upon starting Filebeat with command line to - D:\somewhere\here.log  
with something like this

filebeat.exe -filebeat.yml - paths: - D:\somewhere\here.log

Is that at all possible or do i have to change the filebeat with something else beforehand?  
The reason i am asking this, is because i have many agents on which i run Filebeat and sometimes the directory changes in which logs are being stored. Thank you

---

<div class="post-metadata">

**Author:** ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)\
**Post date:** [July 13, 2017, 5:58pm UTC](https://discuss.elastic.co/t/is-there-a-way-to-change-the-filebeat-prospectors-paths-from-command-line/93015/2 "2017-07-13T17:58:46Z")

</div>

See [Config file format docs](https://www.elastic.co/guide/en/beats/libbeat/current/config-file-format.html).

The full path to the first entry prospectors path entry is `filebeat.prospectors.0.paths.0`. Via `-E` you can pass settings. `-E` also has support for JSON-like arrays.

Preparing the config file a little for more convenience:

```auto
filebeat.prospectors:
- input_type: log
  paths: ${logs.paths}

logs.paths:
  - 'D:\default\path'

```

I can run filebeat via

`fielbeat.exe -c X:\path\to\filebeat.yml -E logs.paths='path1,path2,path3'`

---

<div class="post-metadata">

**Author:** ![Truesight](https://avatars.discourse-cdn.com/v4/letter/t/d26b3c/32.png) [@Truesight](https://discuss.elastic.co/u/Truesight)\
**Post date:** [July 14, 2017, 7:26am UTC](https://discuss.elastic.co/t/is-there-a-way-to-change-the-filebeat-prospectors-paths-from-command-line/93015/3 "2017-07-14T07:26:55Z")

</div>

Cool, that was exactly what i was looking for, thanks a lot!

---

<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:** [August 11, 2017, 7:27am UTC](https://discuss.elastic.co/t/is-there-a-way-to-change-the-filebeat-prospectors-paths-from-command-line/93015/4 "2017-08-11T07:27:03Z")

</div>

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