-
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 Ingest pipeline loading to setup #6814
Add Ingest pipeline loading to setup #6814
Conversation
libbeat/beat/beat.go
Outdated
@@ -55,3 +56,7 @@ type BeatConfig struct { | |||
// SetupMLCallback can be used by the Beat to register MachineLearning configurations | |||
// for the enabled modules. | |||
type SetupMLCallback func(*Beat, *common.Config) error | |||
|
|||
// SetupMLCallback can be used by the Beat to register MachineLearning configurations |
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.
comment on exported type UpdatePipelinesCallback should be of the form "UpdatePipelinesCallback ..." (with optional leading article)
filebeat/fileset/pipelines.go
Outdated
"github.com/elastic/beats/libbeat/logp" | ||
) | ||
|
||
// PipelineLoader factory builds and returns a PipelineLoader |
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.
comment on exported type PipelineLoaderFactory should be of the form "PipelineLoaderFactory ..." (with optional leading article)
filebeat/fileset/modules.go
Outdated
var result string | ||
for module, filesets := range reg.registry { | ||
var filesetNames string | ||
for name, _ := range filesets { |
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.
should omit 2nd value from range; this loop is equivalent to for name := range ...
43af07b
to
32da1d8
Compare
f568a5b
to
c5081f6
Compare
|
@@ -286,6 +286,10 @@ filebeat.inputs: | |||
# This option is not supported on Windows. | |||
#filebeat.registry_file_permissions: 0600 | |||
|
|||
# By default Ingest pipelines are not updated. If this option is enabled Filebeat updates |
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.
Maybe clarify to something like: "By default Ingest pipelines are not updated if a pipeline with the same ID already exists."
@ruflin You got me. Overwrite does feel a bit more descriptive than update does. I am renaming it. |
Renamed and edited the PR comment. |
2624215
to
6a151b5
Compare
The failing tests are unrelated. |
We already have a setup namespace in our configs for templates and dashboards. How about moving the pipeline update setting into this namespace as well? |
@urso I was thinking the same at first again but then was not sure as so far it is only a filebeat feature. I expect us to have it as a global feature soon as other beats will also potentially have pipelines. I'm ok with merging as is as the config option will not potentially conflict with other option, should be fairly easy to migrate to something else and all the code is currently in Filebeat and not libbeat. |
@urso As I understand the role of Ingest pipelines in Beats, they are tied to Filebeat. From architectural point of view I don't think it's a good idea to move the config option to On the other hand I see that from users' point of view it might be more clear to put it under |
@ruflin changing a config options name is never an easy change, as it's a BC breaking. As you noticed, I wonder if we will ever have ingest node pipelines for use by other beats. Besides Ingest Node pipelines, I wonder if we will ever have Logstash filter configs in beats to be configured by any beat. But I'm fine with merging the PR as is. |
1. Update pipeline config option
The yet unreleased flag
--update-pipelines
is removed. Instead of this a new config option is introduced which does the same thing. Its name isfilebeat.overwrite_pipelines
. By default it is set tofalse
.2. Load pipelines using
setup
Furthermore, it's possible to load Ingest pipelines using the command
setup
. Please note, only configured pipelines are loaded. To make sure users don't lose events pipeline loading before sending messages is kept.Closes #6808