# Multiple configuration file with enabled option

**URL:** <https://discuss.elastic.co/t/multiple-configuration-file-with-enabled-option/155899>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [November 8, 2018, 2:14pm UTC](https://discuss.elastic.co/t/multiple-configuration-file-with-enabled-option/155899 "2018-11-08T14:14:17Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![z.fekete](https://avatars.discourse-cdn.com/v4/letter/z/c0e974/32.png) [@z.fekete](https://discuss.elastic.co/u/z.fekete)\
**Post date:** [November 8, 2018, 2:14pm UTC](https://discuss.elastic.co/t/multiple-configuration-file-with-enabled-option/155899/1 "2018-11-08T14:14:18Z")

</div>

I have the following configuration file `/etc/filebeat/filebeat.yml`:

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

output.logstash:
    hosts: ["host"]

```

In each yml file in the folder `/etc/filebeat/conf.d/` I have the following:

```
- type: log
  enabled: true
  paths:
    - /var/log/log-file-a.log
  fields:
    ...

- type: log
  enabled: true
  paths:
    - /var/log/log-file-b.log
  fields:
    ...

- type: log
  enabled: true
  paths:
    - /var/log/log-file-c.log
  fields:
    ...

```

Each file is for different domain. If I want to turn off the monitoring for certain log files of domain or for the whole domain, I set the `enabled` option to false.

Despite when I set the enabled to false, it still monitors the log files, and sends them to the logstash server. What am I doing wrong?

---

<div class="post-metadata">

**Author:** ![kvch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kvch/32/72058_2.png) [@kvch](https://discuss.elastic.co/u/kvch)\
**Post date:** [November 8, 2018, 2:39pm UTC](https://discuss.elastic.co/t/multiple-configuration-file-with-enabled-option/155899/2 "2018-11-08T14:39:38Z")

</div>

You need to enable reloading (I assume you use Filebeat 5.6 based on your configuration.):

```auto
filebeat.config.prospectors:
  path: /etc/filebeat/conf.d/*.yml
  reload.enabled: true
  reload.period: 10s

```

---

<div class="post-metadata">

**Author:** ![z.fekete](https://avatars.discourse-cdn.com/v4/letter/z/c0e974/32.png) [@z.fekete](https://discuss.elastic.co/u/z.fekete)\
**Post date:** [November 8, 2018, 2:49pm UTC](https://discuss.elastic.co/t/multiple-configuration-file-with-enabled-option/155899/3 "2018-11-08T14:49:47Z")

</div>

Oh Sorry I forgot to provide the details: my `filebeat version` outputs:

`filebeat version 6.4.2 (amd64), libbeat 6.4.2 [e193f6d68b25b7ddbe3a3ed8d60bc07fea1ef800 built 2018-09-26 12:42:46 +0000 UTC]`

---

<div class="post-metadata">

**Author:** ![z.fekete](https://avatars.discourse-cdn.com/v4/letter/z/c0e974/32.png) [@z.fekete](https://discuss.elastic.co/u/z.fekete)\
**Post date:** [November 8, 2018, 3:24pm UTC](https://discuss.elastic.co/t/multiple-configuration-file-with-enabled-option/155899/4 "2018-11-08T15:24:47Z")

</div>

I followed the instructions, described here: [https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-configuration-reloading.html](https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-configuration-reloading.html).

In the documentation for version 5.6 I see I have the `reload.enabled` option. But the doc for the `current` version mentions only `scan_frequency` option. Should I define it as 0s to achieve the same behavior?

---

<div class="post-metadata">

**Author:** ![kvch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kvch/32/72058_2.png) [@kvch](https://discuss.elastic.co/u/kvch)\
**Post date:** [November 8, 2018, 3:35pm UTC](https://discuss.elastic.co/t/multiple-configuration-file-with-enabled-option/155899/5 "2018-11-08T15:35:58Z")

</div>

There is a subarticle titled "Live reloading": [https://www.elastic.co/guide/en/beats/filebeat/current/\_live\_reloading.html](https://www.elastic.co/guide/en/beats/filebeat/current/_live_reloading.html)

In 6.4 you can achieve the same thing. Note that `prospector` is deprecated and I used `inputs` instead.

```auto
filebeat.config.inputs:
  enabled: true
  path: configs/*.yml
  reload.enabled: true
  reload.period: 10s

```

`scan_frequency` specifies the interval between checking if the input files have changed. It is unrelated to configuration reload. See more: [https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-input-log.html#filebeat-input-log-scan-frequency](https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-input-log.html#filebeat-input-log-scan-frequency)

---

<div class="post-metadata">

**Author:** ![z.fekete](https://avatars.discourse-cdn.com/v4/letter/z/c0e974/32.png) [@z.fekete](https://discuss.elastic.co/u/z.fekete)\
**Post date:** [November 9, 2018, 7:53am UTC](https://discuss.elastic.co/t/multiple-configuration-file-with-enabled-option/155899/6 "2018-11-09T07:53:20Z")

</div>

Thank you for your assistance. I adjusted my configuration. Removed the deprecated option and added the reload options.

```
filebeat.config.inputs:
  enabled: true
  path: /etc/filebeat/conf.d/*.yml
  reload.enabled: true
  reload.period: 10s

output.logstash:
  hosts: ["host"]

```

I have 4 additional yml files in the folder: `/etc/filebeat/conf.d`/. Each file belongs to one domain, and in each file, there are 3 log definition (Apache and PHP logs).

Despite that the `enabled` option is false. It still monitors the files and sends them to the logstash, and eventually I can see them in the ES. What am I doing wrong?

---

<div class="post-metadata">

**Author:** ![kvch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kvch/32/72058_2.png) [@kvch](https://discuss.elastic.co/u/kvch)\
**Post date:** [November 9, 2018, 8:30am UTC](https://discuss.elastic.co/t/multiple-configuration-file-with-enabled-option/155899/7 "2018-11-09T08:30:40Z")

</div>

Could you please share the debug logs? (`./filebeat -e -d "*"`)

---

<div class="post-metadata">

**Author:** ![z.fekete](https://avatars.discourse-cdn.com/v4/letter/z/c0e974/32.png) [@z.fekete](https://discuss.elastic.co/u/z.fekete)\
**Post date:** [November 9, 2018, 10:14am UTC](https://discuss.elastic.co/t/multiple-configuration-file-with-enabled-option/155899/8 "2018-11-09T10:14:38Z")

</div>

Sure,

I pasted it here: [https://pastebin.com/660a4gZP](https://pastebin.com/660a4gZP)

---

<div class="post-metadata">

**Author:** ![kvch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kvch/32/72058_2.png) [@kvch](https://discuss.elastic.co/u/kvch)\
**Post date:** [November 9, 2018, 10:30am UTC](https://discuss.elastic.co/t/multiple-configuration-file-with-enabled-option/155899/9 "2018-11-09T10:30:30Z")

</div>

I cannot access it, because it is private. You could just paste it here.

---

<div class="post-metadata">

**Author:** ![z.fekete](https://avatars.discourse-cdn.com/v4/letter/z/c0e974/32.png) [@z.fekete](https://discuss.elastic.co/u/z.fekete)\
**Post date:** [November 9, 2018, 10:34am UTC](https://discuss.elastic.co/t/multiple-configuration-file-with-enabled-option/155899/10 "2018-11-09T10:34:14Z")

</div>

Ohh sorry, I changed it to the public. I couldn't paste it here, because only 7k lines are available and I wanted to provide a longer log.

---

<div class="post-metadata">

**Author:** ![z.fekete](https://avatars.discourse-cdn.com/v4/letter/z/c0e974/32.png) [@z.fekete](https://discuss.elastic.co/u/z.fekete)\
**Post date:** [November 20, 2018, 1:10pm UTC](https://discuss.elastic.co/t/multiple-configuration-file-with-enabled-option/155899/11 "2018-11-20T13:10:06Z")

</div>

Should I provide more detailed information about my configuration?

---

<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 18, 2018, 1:10pm UTC](https://discuss.elastic.co/t/multiple-configuration-file-with-enabled-option/155899/12 "2018-12-18T13:10:07Z")

</div>

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