-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecate config_dir (Filebeat) and refactor docs #5321
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,17 @@ | ||
[[filebeat-configuration-reloading]] | ||
== Reload the configuration dynamically | ||
== Load external configuration files | ||
|
||
beta[] | ||
|
||
You can configure Filebeat to dynamically reload configuration files when there | ||
are changes. This feature is available for prospector and module configuration | ||
files only. | ||
|
||
To configure this feature, you specify a path | ||
(https://golang.org/pkg/path/filepath/#Glob[Glob]) to watch for configuration | ||
changes. When the files found by the Glob change, new prospectors and/or | ||
modules are started and 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 following options under | ||
Filebeat can load external configuration files for prospectors and modules, | ||
which allows you to separate your configuration in multiple smaller | ||
configuration files. To use this functionality, use the `path` option from the | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wonder if we really need to mention the options here since we describe them more completely later. Might actually be a bit confusing. Maybe just add links to the sections that follow and say: To use this functionality, specify the BTW, I would probably rename the anchors to load-prospector-config and load-module-config. |
||
`filebeat.config.prospectors` (for prospector configs) or | ||
`filebeat.config.modules` (for module configs): | ||
|
||
`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. | ||
|
||
See <<reload-prospector-config>> and <<reload-module-config>> for examples. | ||
|
||
`filebeat.config.modules` (for module configs) settings. | ||
|
||
[float] | ||
[[reload-prospector-config]] | ||
=== Prospector config | ||
|
||
For prospector configurations, you specify reload options in the | ||
For prospector configurations, you specify `path` option in the | ||
`filebeat.config.prospectors` section of the +{beatname_lc}.yml+ file. For | ||
example: | ||
|
||
|
@@ -42,8 +20,6 @@ example: | |
filebeat.config.prospectors: | ||
enabled: true | ||
path: configs/*.yml | ||
reload.enabled: true | ||
reload.period: 10s | ||
------------------------------------------------------------------------------ | ||
|
||
Each file found by the Glob must contain a list of one or more prospector | ||
|
@@ -71,17 +47,16 @@ same time, it can lead to unexpected behaviour. | |
[[reload-module-config]] | ||
=== Module config | ||
|
||
For module configurations, you specify reload options in the | ||
For module configurations, you specify the `path` option in the | ||
`filebeat.config.modules` section of the +{beatname_lc}.yml+ file. For example: | ||
|
||
[source,yaml] | ||
------------------------------------------------------------------------------ | ||
filebeat.config.modules: | ||
enabled: true | ||
path: prospectors.d/*.yml <1> | ||
reload.enabled: true | ||
reload.period: 10s | ||
------------------------------------------------------------------------------ | ||
|
||
<1> If you change the path setting to look for config changes in a different | ||
directory, you will not be able to use the <<modules-command,`modules`>> command | ||
to enable and disable module configurations. | ||
|
@@ -99,3 +74,39 @@ definitions. For example: | |
enabled: true | ||
var.paths: [/var/log/apache2/error.log*] | ||
------------------------------------------------------------------------------ | ||
|
||
=== Live reloading | ||
|
||
beta[] | ||
|
||
You can configure Filebeat to dynamically reload configuration files when there | ||
are changes. This feature is available for prospector and module configuration | ||
files only. | ||
|
||
To configure this feature, you specify a path | ||
(https://golang.org/pkg/path/filepath/#Glob[Glob]) to watch for configuration | ||
changes. When the files found by the Glob change, new prospectors and/or | ||
modules are started and 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 | ||
under `filebeat.config.prospectors` or `filebeat.config.modules` sections. For | ||
example: | ||
|
||
[source,yaml] | ||
------------------------------------------------------------------------------ | ||
filebeat.config.prospectors: | ||
enabled: true | ||
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change "separate your configuration in multiple smaller" to "separate your configuration into multiple smaller"