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

Make log messages in the file scanner less noisy #38421

Merged
merged 2 commits into from
Mar 20, 2024

Conversation

rdner
Copy link
Member

@rdner rdner commented Mar 19, 2024

  • Demote warning about empty files to the Debug level
  • Demote warnings about files too small to the Debug level
  • Improve wording, so it does not sound like an error

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.

How to test this PR locally

cd ./filebeat/input/filestream
go test

Related issues

* Demote warning about empty files to the Debug level
* Demote warnings about files too small to the Debug level
* Improve wording, so it does not sound like an error
@rdner rdner requested a review from a team as a code owner March 19, 2024 14:58
@rdner rdner requested review from fearful-symmetry and faec March 19, 2024 14:58
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Mar 19, 2024
@mergify mergify bot assigned rdner Mar 19, 2024
Copy link
Contributor

mergify bot commented Mar 19, 2024

This pull request does not have a backport label.
If this is a bug or security fix, could you label this PR @rdner? 🙏.
For such, you'll need to label your PR with:

  • The upcoming major version of the Elastic Stack
  • The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)

To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v8./d.0 is the label to automatically backport to the 8./d branch. /d is the digit

@rdner rdner added Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team backport-v8.13.0 Automated backport with mergify labels Mar 19, 2024
@elasticmachine
Copy link
Collaborator

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Mar 19, 2024
@rdner rdner requested review from belimawr and leehinman March 19, 2024 15:01
@rdner rdner mentioned this pull request Mar 19, 2024
3 tasks
@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

cc @rdner

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

cc @rdner

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

cc @rdner

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

cc @rdner

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

cc @rdner

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

cc @rdner

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

cc @rdner

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

cc @rdner

@elasticmachine
Copy link
Collaborator

elasticmachine commented Mar 19, 2024

💚 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

  • Duration: 134 min 24 sec

❕ Flaky test report

No test was executed to be analysed.

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@elasticmachine
Copy link
Collaborator

elasticmachine commented Mar 19, 2024

@elasticmachine
Copy link
Collaborator

elasticmachine commented Mar 19, 2024

@rdner rdner enabled auto-merge (squash) March 19, 2024 15:13
@rdner rdner merged commit 4df595f into elastic:main Mar 20, 2024
44 of 48 checks passed
mergify bot pushed a commit that referenced this pull request Mar 20, 2024
* Demote warning about empty files to the Debug level
* Demote warnings about files too small to the Debug level
* Improve wording, so it does not sound like an error

(cherry picked from commit 4df595f)
@rdner rdner deleted the lower-log-level-for-empty-files branch March 20, 2024 08:52
rdner added a commit that referenced this pull request Mar 20, 2024
* Demote warning about empty files to the Debug level
* Demote warnings about files too small to the Debug level
* Improve wording, so it does not sound like an error

(cherry picked from commit 4df595f)

Co-authored-by: Denis <denis.rechkunov@elastic.co>
@belimawr belimawr added the backport-7.17 Automated backport to the 7.17 branch with mergify label Aug 19, 2024
mergify bot pushed a commit that referenced this pull request Aug 19, 2024
* Demote warning about empty files to the Debug level
* Demote warnings about files too small to the Debug level
* Improve wording, so it does not sound like an error

(cherry picked from commit 4df595f)
rdner added a commit that referenced this pull request Aug 19, 2024
…isy (#40555)

* Make log messages in the file scanner less noisy (#38421)

* Demote warning about empty files to the Debug level
* Demote warnings about files too small to the Debug level
* Improve wording, so it does not sound like an error

(cherry picked from commit 4df595f)

* Fix the changelog

* Fix lint failure

* fixes for nolint

* use lint:ignore

---------

Co-authored-by: Denis <denis.rechkunov@elastic.co>
Co-authored-by: VihasMakwana <121151420+VihasMakwana@users.noreply.github.com>
Co-authored-by: Mauri de Souza Meneguzzo <mauri870@gmail.com>
@kbujold
Copy link

kbujold commented Sep 9, 2024

Note that this log was missed

filestream input with ID 'my-unique-id' already exists, this will lead to data duplication, please use a different ID

See #31767

@kbujold
Copy link

kbujold commented Sep 9, 2024

Also still seeing this one flooding the system

points to an already known ingest target

{"log.level":"warn","@timestamp":"2024-09-09T17:46:41.990Z","log.logger":"scanner","log.origin":{"function":"github.com/elastic/beats/v7/filebeat/input/filestream.(*fileScanner).GetFiles","file.name":"filestream/fswatch.go","file.line":404},"message":"\"/var/log/dcdbsync/dcdbsync_xxx.log\" points to an already known ingest target \"/var/log/dcdbsync/dcdbsync.log\" [80a036b73f0a2c6d42cfcdfe9d6a5f527262630c6ff7fa5f349cde60158451f8==80a036b73f0a2c6d42cfcdfe9d6a5f527262630c6ff7fa5f349cde60158451f8]. Skipping","service.name":"filebeat","ecs.version":"1.6.0"}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-7.17 Automated backport to the 7.17 branch with mergify backport-v8.13.0 Automated backport with mergify Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants