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

New option in filestream: include_files && check after symlink is resolved #25080

Merged
merged 3 commits into from
Apr 22, 2021

Conversation

kvch
Copy link
Contributor

@kvch kvch commented Apr 14, 2021

What does this PR do?

This PR adds support for a new feature in filestream input named include_files. This option is the counterpart of exclude_files. It expects a list of regexes and it only includes files that match the regexes.

The PR also adds one more check after symlinks are resolved, the original file is tested again with the regexes in include_files and exclude_files.

Why is it important?

exclude_files was not enough for disallowing files.

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.

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Apr 14, 2021
@kvch kvch added needs_docs Team:Elastic-Agent Label for the Agent team labels Apr 14, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/agent (Team:Agent)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Apr 14, 2021
@elasticmachine
Copy link
Collaborator

elasticmachine commented Apr 14, 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

Expand to view the summary

Build stats

  • Build Cause: Pull request #25080 updated

  • Start Time: 2021-04-22T08:12:09.218+0000

  • Duration: 53 min 33 sec

  • Commit: 6864d5b

Test stats 🧪

Test Results
Failed 0
Passed 13617
Skipped 2286
Total 15903

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 13617
Skipped 2286
Total 15903

@kvch
Copy link
Contributor Author

kvch commented Apr 15, 2021

Failing tests are unrelated.

@kvch kvch requested a review from urso April 21, 2021 15:27
@kvch kvch force-pushed the feature-filebeat-filestream-include-files branch from 8637358 to 25673ce Compare April 21, 2021 15:28
@kvch kvch merged commit dfb98b2 into elastic:master Apr 22, 2021
kvch added a commit to kvch/beats that referenced this pull request Apr 22, 2021
… resolved (elastic#25080)

## What does this PR do?

This PR adds support for a new feature in `filestream` input named `include_files`. This option is the counterpart of `exclude_files`. It expects a list of regexes and it only includes files that match the regexes.

The PR also adds one more check after symlinks are resolved, the original file is tested again with the regexes in `include_files` and `exclude_files`.

## Why is it important?

`exclude_files` was not enough for disallowing files.

(cherry picked from commit dfb98b2)
@kvch kvch added the v7.13.0 label Apr 22, 2021
kvch added a commit to kvch/beats that referenced this pull request Apr 22, 2021
… resolved (elastic#25080)

## What does this PR do?

This PR adds support for a new feature in `filestream` input named `include_files`. This option is the counterpart of `exclude_files`. It expects a list of regexes and it only includes files that match the regexes.

The PR also adds one more check after symlinks are resolved, the original file is tested again with the regexes in `include_files` and `exclude_files`.

## Why is it important?

`exclude_files` was not enough for disallowing files.

(cherry picked from commit dfb98b2)
kvch added a commit that referenced this pull request Apr 23, 2021
… resolved (#25080) (#25244)

## What does this PR do?

This PR adds support for a new feature in `filestream` input named `include_files`. This option is the counterpart of `exclude_files`. It expects a list of regexes and it only includes files that match the regexes.

The PR also adds one more check after symlinks are resolved, the original file is tested again with the regexes in `include_files` and `exclude_files`.

## Why is it important?

`exclude_files` was not enough for disallowing files.

(cherry picked from commit dfb98b2)
kvch added a commit that referenced this pull request Apr 23, 2021
… resolved (#25080) (#25245)

## What does this PR do?

This PR adds support for a new feature in `filestream` input named `include_files`. This option is the counterpart of `exclude_files`. It expects a list of regexes and it only includes files that match the regexes.

The PR also adds one more check after symlinks are resolved, the original file is tested again with the regexes in `include_files` and `exclude_files`.

## Why is it important?

`exclude_files` was not enough for disallowing files.

(cherry picked from commit dfb98b2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants