Skip to content

Conversation

@david-garcia-garcia
Copy link
Contributor

Fixes #4074

This PR adds two new configuration options:

  • tail_mode: default or stat
  • stat_poll_interval: how frequently should files be checked for changes when tail_mode=stat

To avoid introducing regresions, I built an abstraction to wrap the actual tail implementation depending on tail_mode. When using tail_mode the previous implementation used. When using tail_mode=stat, a new tail implementation that does not permamently keep the file handle open is used.

@github-actions
Copy link

@david-garcia-garcia: There are no 'kind' label on this PR. You need a 'kind' label to generate the release automatically.

  • /kind feature
  • /kind enhancement
  • /kind refactoring
  • /kind fix
  • /kind chore
  • /kind dependencies
Details

I am a bot created to help the crowdsecurity developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the BirthdayResearch/oss-governance-bot repository.

@github-actions
Copy link

@david-garcia-garcia: There are no area labels on this PR. You can add as many areas as you see fit.

  • /area agent
  • /area local-api
  • /area cscli
  • /area appsec
  • /area security
  • /area configuration
Details

I am a bot created to help the crowdsecurity developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the BirthdayResearch/oss-governance-bot repository.

@codecov
Copy link

codecov bot commented Nov 20, 2025

Codecov Report

❌ Patch coverage is 83.23353% with 28 lines in your changes missing coverage. Please review.
✅ Project coverage is 62.74%. Comparing base (09a1ed1) to head (3b12258).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
.../acquisition/modules/file/tailwrapper/stat_tail.go 82.69% 13 Missing and 5 partials ⚠️
...acquisition/modules/file/tailwrapper/nxadm_tail.go 82.85% 4 Missing and 2 partials ⚠️
pkg/acquisition/modules/file/run.go 88.23% 2 Missing ⚠️
...kg/acquisition/modules/file/tailwrapper/factory.go 81.81% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4075      +/-   ##
==========================================
+ Coverage   62.62%   62.74%   +0.11%     
==========================================
  Files         456      459       +3     
  Lines       33076    33228     +152     
==========================================
+ Hits        20715    20849     +134     
- Misses      10240    10253      +13     
- Partials     2121     2126       +5     
Flag Coverage Δ
bats 46.19% <30.53%> (-0.12%) ⬇️
unit-linux 35.54% <82.63%> (+0.26%) ⬆️
unit-windows 24.84% <59.88%> (+0.15%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@david-garcia-garcia david-garcia-garcia changed the title [WIP] New tail_mode and stat_poll_interval settings to support not keeping file handles permanently open New tail_mode and stat_poll_interval settings to support not keeping file handles permanently open Nov 20, 2025
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.

Support not keeping file handles permanently open when using file acquisition

1 participant