-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[Enhancement] Add RotateOnStartup feature flag for file output #19347
Conversation
enhance file output to also be able to disable file rotation on startup, which is enabled by default (see rotator)
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
1 similar comment
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
💚 CLA has been signed |
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
Trends 🧪💚 Flaky test reportTests succeeded. Expand to view the summary
Test stats 🧪
|
Pinging @elastic/siem (Team:SIEM) |
Pinging @elastic/integrations-services (Team:Services) |
I already signed the CLA, but I have not yet received a confirmation. |
@gitck I think the issue is that the commits in the PR do not match the email address used to sign the CLA. You can see the email in the commits with https://patch-diff.githubusercontent.com/raw/elastic/beats/pull/19347.patch. |
Code looks good. We need to get the CLA figure out, and I think we need to rebuild the docs too. |
@andrewkrow Thank you for the hint. I signed the CLA again with the matching email address. I hope this is working now, sorry for the inconvenience caused. |
jenkins, run tests |
I am not sure how to proceed. Who is going to review this PR finally? |
@gitck Right now CI is still failing. Can you run |
Trying to run |
'true' reflects the behaviour before my changes, i.e. rotation on startup is the 'default' behaviour (at it is now) and my changes does not change it |
Ah, okay, that makes sense. @urso can you take a quick look at this? Not familiar with the output modules. |
/test |
Alright, tested, looks good to me. |
@gitck just one last thing I noticed. Can you add the new config option to |
You'll need to re-run |
@fearful-symmetry I added the new config option to the mentioned file,
|
The fact that it's in |
How to proceed, any suggestion? |
You might need to merge from master, there could be some CI changes we're missing. |
Okay, now I'm seeing a few actual failures:
You might need to run that from the root |
Ok, thanks for the hint. Unfortunately, it seems that there is a problem with my dev environment under Windows. As already mentioned earlier, I receive 'Unknown target specified: update' message. Any idea why this is not working, seems like a basic setup issue? |
I think you might need to do |
Obviously it does not work in my case |
Finally, I managed to execute |
@urso should we backport this to 7.x? |
* upstream/master: [Elastic Agent] Fix docker entrypoint for elastic-agent. (elastic#24155) [PACKAGING] Push docker images with the architecture in the version (elastic#24121) [Agent] Add agent standalone manifests for system module & Pod's log collection (elastic#23938) indicator type url is in upper case (elastic#24152) [Filebeat] Document netflow internal_networks and set default (elastic#24110) [Filebeat] Adding fixes to the TI module (elastic#24133) [Enhancement] Add RotateOnStartup feature flag for file output (elastic#19347) [Ingest Manager] Fix: Successfully installed and enrolled agent running standalone (elastic#24128) Set Elastic licence type for APM server Beats update job (elastic#24122) Add logrotation section on Running Filebeat on k8s (elastic#24120) [CI] Run if manual UI (elastic#24116) [CI] enable x-pack/heartbeat in the CI (elastic#23873)
…dows-7 * upstream/master: Remove OSS reference for kibana and elasticsearch (elastic#24164) Skip flaky TestActions on MacOSx (elastic#23966) [Filebeat][AWS] Fix vpcflow pipeline exception: Cannot invoke "Object.getClass()" because "receiver" is null (elastic#24167) [Elastic Agent] Fix docker entrypoint for elastic-agent. (elastic#24155) [PACKAGING] Push docker images with the architecture in the version (elastic#24121) [Agent] Add agent standalone manifests for system module & Pod's log collection (elastic#23938) indicator type url is in upper case (elastic#24152) [Filebeat] Document netflow internal_networks and set default (elastic#24110) [Filebeat] Adding fixes to the TI module (elastic#24133) [Enhancement] Add RotateOnStartup feature flag for file output (elastic#19347) [Ingest Manager] Fix: Successfully installed and enrolled agent running standalone (elastic#24128) Set Elastic licence type for APM server Beats update job (elastic#24122) Add logrotation section on Running Filebeat on k8s (elastic#24120) [CI] Run if manual UI (elastic#24116) [CI] enable x-pack/heartbeat in the CI (elastic#23873) chore: comment out the E2E (elastic#24109) chore: add-backport-next (elastic#24098) Adjust the position of the architecture name in Dockerlogbeat tarball (elastic#24095) Update dependencies for M1 support in System (elastic#24019)
…-arm * upstream/master: (24 commits) Add example input autodsicover config (elastic#24157) Empty configuration options generate `<no value>` string for azure-eventhub input (elastic#24156) Remove OSS reference for kibana and elasticsearch (elastic#24164) Skip flaky TestActions on MacOSx (elastic#23966) [Filebeat][AWS] Fix vpcflow pipeline exception: Cannot invoke "Object.getClass()" because "receiver" is null (elastic#24167) [Elastic Agent] Fix docker entrypoint for elastic-agent. (elastic#24155) [PACKAGING] Push docker images with the architecture in the version (elastic#24121) [Agent] Add agent standalone manifests for system module & Pod's log collection (elastic#23938) indicator type url is in upper case (elastic#24152) [Filebeat] Document netflow internal_networks and set default (elastic#24110) [Filebeat] Adding fixes to the TI module (elastic#24133) [Enhancement] Add RotateOnStartup feature flag for file output (elastic#19347) [Ingest Manager] Fix: Successfully installed and enrolled agent running standalone (elastic#24128) Set Elastic licence type for APM server Beats update job (elastic#24122) Add logrotation section on Running Filebeat on k8s (elastic#24120) [CI] Run if manual UI (elastic#24116) [CI] enable x-pack/heartbeat in the CI (elastic#23873) chore: comment out the E2E (elastic#24109) chore: add-backport-next (elastic#24098) Adjust the position of the architecture name in Dockerlogbeat tarball (elastic#24095) ...
What does this PR do?
File output can now be configured to disable file rotation on startup. This PR introduces the configuration option
rotate_on_startup
and configures the internally used FileRotator (rotator.go) accordingly.Why is it important?
To avoid file rotation on every startup.
Checklist
- [ ] I have added tests that prove my fix is effective or that my feature worksCHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Author's Checklist
How to test this PR locally
Configure beat to file output. If configuration option
rotate_on_startup
is set tofalse
, file may no longer be rotated on startup.Related issues