# Metricbeat 6.0.0-beta1 config reload issue

**URL:** <https://discuss.elastic.co/t/metricbeat-6-0-0-beta1-config-reload-issue/98234>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [August 24, 2017, 12:34pm UTC](https://discuss.elastic.co/t/metricbeat-6-0-0-beta1-config-reload-issue/98234 "2017-08-24T12:34:10Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![randude](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/randude/32/34911_2.png) [@randude](https://discuss.elastic.co/u/randude)\
**Post date:** [August 24, 2017, 12:34pm UTC](https://discuss.elastic.co/t/metricbeat-6-0-0-beta1-config-reload-issue/98234/1 "2017-08-24T12:34:11Z")

</div>

Hi,  
I enabled this feature and tried several things.  
I changed one of the modules from false to true and then tried to add a new module altogether.  
In both cases, nothing was written to log to confirm that the reload happened and no new data was written to my output file.

Here's my conf file:

```auto
metricbeat.config.modules:

  path: /etc/metricbeat/metricbeat.yml
  reload.period: 5s

  reload.enabled: true

metricbeat.max_start_delay: 10s

metricbeat.modules:
- module: system
  metricsets: ["process"]
  processors:
   - include_fields:
      fields: ["system.process.name", "system.process.cpu.total.pct", "system.process.cmdline", "system.process.memory.size", "system.process.fd.open"]
   - drop_event.when.not.regexp:
      system.process.name: 'sshd'
  enabled: true
  period: 30s
  processes: ['.*']
  
- module: system
  metricsets: ["filesystem"]
  enabled: true
  period: 30s
  processes: ['.*']
  processors:
   - include_fields:
      fields: ["system.filesystem.free", "system.filesystem.total", "system.filesystem.used.pct", "system.filesystem.device_name"]
      
- module: system
  metricsets: ["memory"]
  enabled: true
  period: 30s
  processes: ['.*']
  processors:
   - include_fields:
      fields: ["system.memory.actual.free", "system.memory.total"]
        
- module: system
  metricsets: ["network"]
  enabled: true
  period: 30s
  processes: ['.*']
  processors:
   - include_fields:
      fields: ["system.network.in.bytes", "system.network.out.bytes"]
      
- module: system
  metricsets: ["cpu"]
  enabled: true
  period: 30s
  processes: ['.*']
  processors:
   - include_fields:
      fields: ["system.cpu.cores", "system.cpu.idle.pct"]
  
  cpu.metrics: ["percentages"] # The other available options are normalized_percentages and ticks.
  core.metrics: ["percentages"] # The other available option is ticks.
  
- module: mongodb
  metricsets: ["dbstats", "status"]
  enabled: false
  period: 30s
  hosts: ["localhost:27017"]
  processors:
   - drop_fields:
      fields: ['beat']
        
logging.to_syslog: false
logging.metrics.enabled: true
logging.metrics.period: 1800
logging.level: debug
logging.to_files: true
logging.json: false

logging.files:
  path: /var/log/metricbeat
  name: metricbeat.log
  rotateeverybytes: 10485760
  keepfiles: 7
  
output.file:
  path: "/var//log/metricbeat/"
  filename: metricbeat.txt
  #rotate_every_kb: 10000
  number_of_files: 2

```

---

<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:** [August 24, 2017, 3:50pm UTC](https://discuss.elastic.co/t/metricbeat-6-0-0-beta1-config-reload-issue/98234/2 "2017-08-24T15:50:48Z")

</div>

Hi @randude,

From your config I see:

```auto
metricbeat.config.modules:
  path: /etc/metricbeat/metricbeat.yml
  reload.period: 5s
  reload.enabled: true

```

But metricbeat expects `metricbeat.config.modules.path` to be a pattern of files to load, check [https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-configuration-reloading.html](https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-configuration-reloading.html) for more details. I think you want to create a new folder and put your modules on separate files on it

Best regards

---

<div class="post-metadata">

**Author:** ![randude](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/randude/32/34911_2.png) [@randude](https://discuss.elastic.co/u/randude)\
**Post date:** [August 24, 2017, 4:09pm UTC](https://discuss.elastic.co/t/metricbeat-6-0-0-beta1-config-reload-issue/98234/3 "2017-08-24T16:09:09Z")

</div>

Hi, thanks for the reply @exekias  
I enabled the log level to be debug and i saw that it did find my pattern. The path that i provided is a legal regex after all.  
However, it said that it didnt detect any change.  
So just to clarify, does it load only new files or can it actually detect changes in existing modules i.e disabling/adding new processors?

---

<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:** [August 24, 2017, 4:32pm UTC](https://discuss.elastic.co/t/metricbeat-6-0-0-beta1-config-reload-issue/98234/4 "2017-08-24T16:32:34Z")

</div>

It can detect changes, after loading a valid configuration 🙂

The issue in this case is that when it tries to load `metricbeat.yml`it doesn't find a module, but the whole settings for metricbeat, which is not a valid config for a module.

---

<div class="post-metadata">

**Author:** ![randude](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/randude/32/34911_2.png) [@randude](https://discuss.elastic.co/u/randude)\
**Post date:** [August 24, 2017, 6:29pm UTC](https://discuss.elastic.co/t/metricbeat-6-0-0-beta1-config-reload-issue/98234/5 "2017-08-24T18:29:26Z")

</div>

I see! That explains it haha.  
Thanks 🙂

You should add that to the official doc.  
"Each file found by the Glob must contain **_only_** a list of one or more module definitions. "

---

<div class="post-metadata">

**Author:** ![randude](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/randude/32/34911_2.png) [@randude](https://discuss.elastic.co/u/randude)\
**Post date:** [August 27, 2017, 8:03am UTC](https://discuss.elastic.co/t/metricbeat-6-0-0-beta1-config-reload-issue/98234/6 "2017-08-27T08:03:41Z")

</div>

So I got it to work. I set the path to "path: /etc/metricbeat/modules.yml" and had to remove the "metricbeat.modules:" headline.  
Thanks!

---

<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:** [September 24, 2017, 8:03am UTC](https://discuss.elastic.co/t/metricbeat-6-0-0-beta1-config-reload-issue/98234/7 "2017-09-24T08:03:43Z")

</div>

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