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

Filebeat: Make all filesets disabled in default configuration #27762

Merged
merged 6 commits into from
Sep 15, 2021

Conversation

adriansr
Copy link
Contributor

@adriansr adriansr commented Sep 6, 2021

What does this PR do?

Changes the default configuration for Filebeat's filesets to make them disabled by default (enabled: false).

Adds a check to the config and update targets of mage to check that default configurations have an explicit disable:

Error: 1 error: in file 'modules.d/checkpoint.yml.disabled': checkpoint module dataset firewall must be explicitly disabled (needs enabled: false)

Why is it important?

The previous default of having all filesets enabled, paired with the configuration loader enabling all non-explicitly-disabled filesets (changed in #27526) has been causing trouble for our users for quite some time.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • [ ] I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Author's Checklist

  • Update docs

Updated docs

Shared modules configuration snippet:
Screen Shot 2021-09-08 at 14 45 34


Filebeat getting started guide:
Screen Shot 2021-09-08 at 14 48 34

Related issues

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Sep 6, 2021
@elasticmachine
Copy link
Collaborator

elasticmachine commented Sep 6, 2021

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2021-09-15T09:27:57.186+0000

  • Duration: 147 min 45 sec

  • Commit: 9240081

Test stats 🧪

Test Results
Failed 0
Passed 54032
Skipped 5324
Total 59356

Trends 🧪

Image of Build Times

Image of Tests

💚 Flaky test report

Tests succeeded.

Expand to view the summary

Test stats 🧪

Test Results
Failed 0
Passed 54032
Skipped 5324
Total 59356

@elasticmachine
Copy link
Collaborator

Pinging @elastic/security-external-integrations (Team:Security-External Integrations)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Sep 6, 2021
@dedemorton
Copy link
Contributor

Sounds like users will need to enable the module and always edit the config to turn on the filesets they want to use. I understand why we are doing this, but it sounds like the getting started workflow will be much less streamlined.

For doc changes (in addition to what you've already done), we'll need to:

  • Update the Kibana in-product instructions on the Add Data pages and make it clear that users need to enable filesets explicitly.
  • Update the shared file here and make it clear that users need to enable filesets explicitly.
  • Add info about this change to the breaking changes documentation for 8.0.0.
  • Update any tutorials in the observability guide that show module configs.
  • Update the stack getting started.
  • Check the cloud and logstash docs, too, because I think they might have steps for using Filebeat modules.

I can create an issue in the observability-docs repo to track this work, if you'd like.

@adriansr
Copy link
Contributor Author

adriansr commented Sep 8, 2021

@dedemorton

I can create an issue in the observability-docs repo to track this work, if you'd like.

Yes, please.

I've updated in this PR the docs that are included in the Beats repo, can you have look?

Copy link
Contributor

@dedemorton dedemorton left a comment

Choose a reason for hiding this comment

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

LGTM

@mergify
Copy link
Contributor

mergify bot commented Sep 10, 2021

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b disable_filesets_by_default upstream/disable_filesets_by_default
git merge upstream/master
git push upstream disable_filesets_by_default

@adriansr adriansr merged commit ba9eebf into elastic:master Sep 15, 2021
v1v added a commit to v1v/beats that referenced this pull request Sep 20, 2021
* upstream/master: (658 commits)
  Add complete k8s metadata through composable provider (elastic#27691)
  Revert "Fix issue where --insecure didn't propogate to Fleet Server ES connection (elastic#27969)" (elastic#27997)
  Remove deprecated kafka fields (elastic#27938)
  [Filebeat] Add Base64 encoded HMAC & UUID template functions to httpjson input (elastic#27873)
  Improve httpjson template function join (elastic#27996)
  Remove kubernetes.container.image alias (elastic#27898)
  [Elastic Agent] Golden files for program tests (elastic#27862)
  [Elastic Agent] Disable modules.d in metricbeat (elastic#27860)
  libbeat/common/seccomp: provide default policy for linux arm64 (elastic#27955)
  Fix logger statement in aws-s3 input (elastic#27982)
  Fix wrong merge (elastic#27976)
  Fix issue where --insecure didn't propogate to Fleet Server ES connection (elastic#27969)
  Forward-port 7.14.2 changelog to master (elastic#27975)
  [Filebeat] Removing duplicate modules (aliases) Observability (elastic#27919)
  Fix path in vagrant windows script (elastic#27966)
  [Filebeat] Removing duplicate modules (aliases) and Cyberark (elastic#27915)
  No changelog for 8.0.0-alpha2 (elastic#27961)
  Add write access to 'url.value' from 'request.transforms'. (elastic#27937)
  Docker: remove deprecated fields (elastic#27933)
  Filebeat: Make all filesets disabled in default configuration (elastic#27762)
  ...
@adriansr adriansr mentioned this pull request Sep 27, 2021
19 tasks
Icedroid pushed a commit to Icedroid/beats that referenced this pull request Nov 1, 2021
…c#27762)

What does this PR do?

Changes the default configuration for Filebeat's filesets to make them
disabled by default (enabled: false).

Adds a check to the config and update targets of mage to check that
default configurations have an explicit disable:

> error: in file 'modules.d/checkpoint.yml.disabled': checkpoint module
> dataset firewall must be explicitly disabled (needs enabled: false)

Why is it important?

The previous default of having all filesets enabled, paired with
the configuration loader enabling all non-explicitly-disabled
filesets (changed in elastic#27526) has been causing trouble for our users
for quite some time.
adriansr added a commit to adriansr/beats that referenced this pull request Nov 4, 2021
Since elastic#27526 and elastic#27762, Filebeat will have all filesets disabled by
default. To prevent user confusion, a warning message to alert the user
of a configured module without any enabled filesets was added. However,
due to Filebeat internals, this message will only appear for modules
configured from the command-line (--modules flag).

This updates the code to ensure it works also for modules configured via
modules.d directory and turns the warning into a hard-error that
prevents startup.
adriansr added a commit that referenced this pull request Nov 4, 2021
Since #27526 and #27762, Filebeat will have all filesets disabled by
default. To prevent user confusion, a warning message to alert the user
of a configured module without any enabled filesets was added. However,
due to Filebeat internals, this message will only appear for modules
configured from the command-line (--modules flag).

This updates the code to ensure it works also for modules configured via
modules.d directory and turns the warning into a hard-error that
prevents startup.
mergify bot pushed a commit that referenced this pull request Nov 4, 2021
Since #27526 and #27762, Filebeat will have all filesets disabled by
default. To prevent user confusion, a warning message to alert the user
of a configured module without any enabled filesets was added. However,
due to Filebeat internals, this message will only appear for modules
configured from the command-line (--modules flag).

This updates the code to ensure it works also for modules configured via
modules.d directory and turns the warning into a hard-error that
prevents startup.

(cherry picked from commit 707ed1d)
adriansr added a commit that referenced this pull request Nov 6, 2021
Since #27526 and #27762, Filebeat will have all filesets disabled by
default. To prevent user confusion, a warning message to alert the user
of a configured module without any enabled filesets was added. However,
due to Filebeat internals, this message will only appear for modules
configured from the command-line (--modules flag).

This updates the code to ensure it works also for modules configured via
modules.d directory and turns the warning into a hard-error that
prevents startup.

(cherry picked from commit 707ed1d)

Co-authored-by: Adrian Serrano <adrisr83@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Filebeat][proposal] Disable filesets that are not configured
3 participants