-
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
Add filebeat modules config reloading #4566
Conversation
1e89ac6
to
02e5009
Compare
4d30d80
to
759420a
Compare
759420a
to
5d9cc6c
Compare
CHANGELOG.asciidoc
Outdated
@@ -68,6 +68,7 @@ https://github.com/elastic/beats/compare/v6.0.0-alpha2...master[Check the HEAD d | |||
- Add support for loading Xpack Machine Learning configurations from the modules, and added sample configurations for the Nginx module. {pull}4506[4506] | |||
- Add udp prospector type. {pull}4452[4452] | |||
- Enabled Cgo which means libc is dynamically compiled. {pull}4546[4546] | |||
- Add module config reloading mechanism {pull}4566[4566] |
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.
We should probably mark this as beta
, since the config reloading in metricbeat is also beta.
filebeat/crawler/crawler.go
Outdated
logp.Beta("Loading separate prospectors is enabled.") | ||
|
||
c.reloader = cfgfile.NewReloader(configModules) | ||
// TODO add beatVersion here |
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.
I see you pass it above, so you could add it now?
What I didn't see in this PR is where are the Ingest Nodes pipelines loaded. They need to be registered with the Elasticsearch output so they are loaded on each re-connect. See here. |
filebeat/fileset/factory.go
Outdated
"github.com/elastic/beats/filebeat/registrar" | ||
) | ||
|
||
// Factory is a factory for registrars |
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.
Is this really a factory of registrars? Or did you mean a factory of modules or prospectors?
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.
Uhm, this was copied from here: https://github.com/elastic/beats/blob/master/filebeat/prospector/factory.go#L11, I'll better put factory of modules
Thanks for the review, I'm adding on demand pipeline load for dynamic modules, what do you think about ML jobs? I'm inclined to leave them out of this |
27abf9c
to
b5a3e3a
Compare
@exekias Yeah, ML jobs and dashboards should be on |
b5a3e3a
to
798f41b
Compare
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.
LGTM.
Removing needs_docs tag. Docs were added in #4930 |
This PR adds support for module reloading, mimicking current prospectors functionality. The mechanism is the same, just define: