# Filebeat config prospectors not working in 6.0

**URL:** <https://discuss.elastic.co/t/filebeat-config-prospectors-not-working-in-6-0/108007>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [November 16, 2017, 7:46pm UTC](https://discuss.elastic.co/t/filebeat-config-prospectors-not-working-in-6-0/108007 "2017-11-16T19:46:32Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Warren\_Turner](https://avatars.discourse-cdn.com/v4/letter/w/e9c0ed/32.png) [@Warren\_Turner](https://discuss.elastic.co/u/Warren_Turner)\
**Post date:** [November 16, 2017, 7:46pm UTC](https://discuss.elastic.co/t/filebeat-config-prospectors-not-working-in-6-0/108007/1 "2017-11-16T19:46:33Z")

</div>

Hey everybody,  
So I upgraded filebeat to version 6.0.0 and I saw this message in the logs:

`WARN DEPRECATED: config_dir is deprecated. Use filebeat.config.prospectors instead. Will be removed in version: 7.0.0`

So I went in the docs and found this:  
[https://www.elastic.co/guide/en/beats/filebeat/6.x/filebeat-configuration-reloading.html#load-prospector-config](https://www.elastic.co/guide/en/beats/filebeat/6.x/filebeat-configuration-reloading.html#load-prospector-config)

Which says I need to add something like this to my config instead:

```
filebeat.config.prospectors:
  enabled: true
  path: configs/*.yml

```

However, when I did this and restarted filebeat it did not load any of my yml files in that directory and gives me no errors? What am I doing wrong?

---

<div class="post-metadata">

**Author:** ![tudor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tudor/32/3753_2.png) [@tudor](https://discuss.elastic.co/u/tudor)\
**Post date:** [November 16, 2017, 10:32pm UTC](https://discuss.elastic.co/t/filebeat-config-prospectors-not-working-in-6-0/108007/2 "2017-11-16T22:32:40Z")

</div>

Can you past a sample of the YML files in `config/`?

The syntax is a bit different in the sense that when using the new option, the fragment YAML should contain an array of prospectors, while in the old one, the `filebeat.prospectors` "header" was needed.

---

<div class="post-metadata">

**Author:** ![Warren\_Turner](https://avatars.discourse-cdn.com/v4/letter/w/e9c0ed/32.png) [@Warren\_Turner](https://discuss.elastic.co/u/Warren_Turner)\
**Post date:** [November 16, 2017, 11:59pm UTC](https://discuss.elastic.co/t/filebeat-config-prospectors-not-working-in-6-0/108007/3 "2017-11-16T23:59:39Z")

</div>

Sure thing:

```
filebeat.prospectors:

- type: log

  paths:
    - /opt/jboss/log/px-web-jsp.json

  json.keys_under_root: true
  fields_under_root: true
  fields:
    type: px-web-server

  scan_frequency: 10s
  ignore_older: 24h
  close_removed: true
  clean_removed: true
  close_inactive: 5m
  clean_inactive: 30h

```

I tried commenting out the "filebeat.prospectors:" part but it didn't seem to do anything

---

<div class="post-metadata">

**Author:** ![tudor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tudor/32/3753_2.png) [@tudor](https://discuss.elastic.co/u/tudor)\
**Post date:** [November 17, 2017, 10:41am UTC](https://discuss.elastic.co/t/filebeat-config-prospectors-not-working-in-6-0/108007/4 "2017-11-17T10:41:40Z")

</div>

The syntax should be good (if you take out the `filebeat.prospectors:` part). Can you run with `-d "*"` and paste the output?

---

<div class="post-metadata">

**Author:** ![Warren\_Turner](https://avatars.discourse-cdn.com/v4/letter/w/e9c0ed/32.png) [@Warren\_Turner](https://discuss.elastic.co/u/Warren_Turner)\
**Post date:** [November 17, 2017, 5:17pm UTC](https://discuss.elastic.co/t/filebeat-config-prospectors-not-working-in-6-0/108007/5 "2017-11-17T17:17:47Z")

</div>

Hm, so I just redid all the steps again and I _think_ it is working? I see this in the log:

```
2017-11-17T12:14:51-05:00 INFO Loading and starting Prospectors completed. Enabled prospectors: 0
2017-11-17T12:14:51-05:00 INFO Config reloader started
2017-11-17T12:14:51-05:00 INFO Starting 2 runners ...
2017-11-17T12:14:51-05:00 INFO Starting prospector of type: log; id: 10730498759109995509
2017-11-17T12:14:51-05:00 INFO Starting prospector of type: log; id: 15532996734736054351
2017-11-17T12:14:51-05:00 INFO Loading of config files completed.
2017-11-17T12:14:51-05:00 INFO Harvester started for file: /opt/jboss/px-web-jsp/log/localhost_access_log.log
2017-11-17T12:14:51-05:00 INFO Harvester started for file: /opt/jboss/px-web-jsp/log/px-web-jsp.json

```

So... it looks like there are 0 prospectors but it is harvesting the logs? Not sure how that is possible. As far as what fixed it I'm not sure, the only thing I did difference was remove the "filebeat.prospectors" line from the yml file instead of commenting it out

---

<div class="post-metadata">

**Author:** ![Jonher937](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jonher937/32/9034_2.png) [@Jonher937](https://discuss.elastic.co/u/Jonher937)\
**Post date:** [November 22, 2017, 10:12am UTC](https://discuss.elastic.co/t/filebeat-config-prospectors-not-working-in-6-0/108007/6 "2017-11-22T10:12:34Z")

</div>

I have the exact same problem in v6.0.0

```
.\filebeat.exe --version
filebeat version 6.0.0 (amd64), libbeat 6.0.0

```

This works:

```
filebeat.config_dir: 'C:\Program files\filebeat\conf.d'

```

And this does not:

```
filebeat.config.prospectors:
  enabled: true
  path: conf.d/*.yml

```

Example prospector in conf.d (test.yaml):

```
filebeat:
  prospectors:
    -
      paths:
        - C:\ProgramData\example\logs\*.log
      fields:
        type: debuginclude
      fields_under_root: true
      encoding: windows-1252
      multiline:
        pattern: ([0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2},[0-9]{3})
        negate: true
        match: after

```

@tudor Do you need anything else to continue debugging?

---

<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:** [November 23, 2017, 9:47am UTC](https://discuss.elastic.co/t/filebeat-config-prospectors-not-working-in-6-0/108007/7 "2017-11-23T09:47:36Z")

</div>

You have to remove the `filebeat.prospector` namespace. The files in `conf.d` are supposed to contain lists of prospector configurations only. [An Example](https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-configuration-reloading.html#load-prospector-config) is given in the docs.

---

<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 21, 2017, 9:47am UTC](https://discuss.elastic.co/t/filebeat-config-prospectors-not-working-in-6-0/108007/8 "2017-12-21T09:47:44Z")

</div>

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