Reload Configurationedit

Warning

This functionality is in beta and is subject to change. The design and code is considered to be less mature than official GA features. Elastic will take a best effort approach to fix any issues, but beta features are not subject to the support SLA of official GA features.

You can configure Filebeat to dynamically reload prospector configuration files when there are changes. To do this, you specify a path (Glob) to watch for prospector configuration changes. When the files found by the Glob change, new prospectors are started/stopped according to changes in the configuration files.

This feature is especially useful in container environments where one container is used to tail logs for services running in other containers on the same host.

To enable dynamic config reloading, you specify the path and reload options in the main filebeat.yml config file. For example:

filebeat.config.prospectors:
  path: configs/*.yml
  reload.enabled: true
  reload.period: 10s
path
A Glob that defines the files to check for changes.
reload.enabled
When set to true, enables dynamic config reload.
reload.period
Specifies how often the files are checked for changes. Do not set the period to less than 1s because the modification time of files is often stored in seconds. Setting the period to less than 1s will result in unnecessary overhead.

Each file found by the Glob must contain a list of one or more prospector definitions. For example:

- input_type: log
  paths:
    - /var/log/mysql.log
  scan_frequency: 10s

- input_type: log
  paths:
    - /var/log/apache.log
  scan_frequency: 5s
Warning

It is critical that two running prospectors DO NOT have overlapping file paths defined. If more than one prospector harvests the same file at the same time, it can lead to unexpected behaviour.