Skip to content
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

Update filebeat registry configuration #10504

Merged
merged 7 commits into from
Feb 6, 2019
Merged

Conversation

urso
Copy link

@urso urso commented Feb 2, 2019

Change registry config and directory layout, preparing for future
changes.

  • remove settings filebeat.registry_file and replace with
    filebeat.registry.path. Path will be a directory, and the
    actual contents will be stored under
    ${filebeat.registry.path}/filebeat/data.json.
  • introduce <registry path>/filebeat/meta.json with version number of
    the current directories layout.
  • move filebeat.registry_flush to filebeat.registry.flush
  • move filebeat.registry_file_permission to
    filebeat.registry.file_permission
  • update tests

This PR introduces breaking changes now, so to reduce the impact for when we introduce the new registry format.

Note: I did keep the registry settings under filebeat.registry, but I'm still considering to change to top-level setting registry, as the future registry might become interesting for some auditbeat use-cases as well.

@urso urso added the in progress Pull request is currently in progress. label Feb 2, 2019
@urso urso requested a review from a team as a code owner February 2, 2019 03:58
OverwritePipelines bool `config:"overwrite_pipelines"`
}

type Registry struct {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exported type Registry should have comment or be unexported

@urso urso changed the title [WIP] Update filebeat registry configuration Update filebeat registry configuration Feb 2, 2019
@urso urso added review Filebeat Filebeat and removed in progress Pull request is currently in progress. labels Feb 2, 2019
@urso urso added in progress Pull request is currently in progress. and removed review labels Feb 2, 2019
@urso
Copy link
Author

urso commented Feb 3, 2019

Jenkins, test this.

@ruflin
Copy link
Member

ruflin commented Feb 4, 2019

As the new registry is a libbeat feature, should the config be prefixed by filebeat or not?

@urso
Copy link
Author

urso commented Feb 4, 2019

As the new registry is a libbeat feature, should the config be prefixed by filebeat or not?

I'm thinking the same. It's a little ugly though. Filebeat itself needs to install the registry with the publisher pipeline, but filebeat does not have access to the root configuration (without introducing even more hacks).

The core functionality will be provided by libbeat. This is basically a kvstore interface. but the actual registrar will stay in filebeat as well, as the registrar is very much coupled with the log input. Out of the box integration of registry with publisher pipeline and required refactorings in filebeat is more likely a 8.0 target.

@ph ph self-requested a review February 4, 2019 22:28
@urso urso force-pushed the registry-dir branch 3 times, most recently from b9d7456 to 2715af6 Compare February 5, 2019 17:11
@ph
Copy link
Contributor

ph commented Feb 5, 2019

@urso good looks good and thanks for taking care of updating the doc, the failures on the CI are maybe related, they all look to be a synchronization issue.

@urso
Copy link
Author

urso commented Feb 5, 2019

fixed filebeat tests. Was another rebase error.

urso added 7 commits February 6, 2019 01:07
Change registry config and directory layout, preparing for future
changes.

- remove settings `filebeat.registry_file` and replace with
  `filebeat.registry.path`. Path will be a directory, and the
  actual contents will be stored under
  `${filebeat.registry.path}/filebeat/data.json`.
- introduce `<registry path>/filebeat/meta.json` with version number of
  the current directories layout.
- move `filebeat.registry_flush` to `filebeat.registry.flush`
- move `filebeat.registry_file_permission` to
  `filebeat.registry.file_permission`
- update tests
@urso urso merged commit a2a763c into elastic:master Feb 6, 2019
@urso urso deleted the registry-dir branch February 19, 2019 18:46
andrewkroh added a commit to andrewkroh/beats-tester that referenced this pull request Mar 21, 2019
The registry path changed in elastic/beats#10504.
andrewkroh added a commit to elastic/beats-tester that referenced this pull request Mar 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Filebeat Filebeat in progress Pull request is currently in progress.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants