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

[Feature Request] Changing log_retention_days should update the retention policy of the LogGroup #121

Closed
markussiebert opened this issue Nov 2, 2020 · 5 comments
Labels
enhancement New feature or request

Comments

@markussiebert
Copy link

It should be possible to update the logretention period via the plugin. Trying it out introducing the log_retention_days option for an existing created LogGroup didn't changed the retention policy.

@davidnewhall
Copy link
Contributor

This feature currently only sets the retention when it creates a new group. Setting it on existing groups would require an out-of-band routine to constantly check all groups that the plugin writes to, or it would require adding extra API calls per-log-line to check the group's retention. Neither of these sound like ideal solutions, and this may not be a feature that fits in this app very well. Thoughts?

@PettitWesley
Copy link
Contributor

A simple solution would be to simply always set the retention in this function, even if the log group already exists: https://github.com/aws/amazon-cloudwatch-logs-for-fluent-bit/blob/mainline/cloudwatch/cloudwatch.go#L565

I think that'd accomplish what most users want.

@davidnewhall
Copy link
Contributor

Yeah totally. We could probably change this line to:

return output.setLogGroupRetention(e.group)

@PettitWesley
Copy link
Contributor

This has been implemented and will go out in the next release.

@zhonghui12
Copy link
Contributor

This has been included in recent release, please check it here: https://github.com/aws/aws-for-fluent-bit/releases/tag/v2.10.0.

Will close this issue. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants