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

bucket logging: Change logrotate configuration from daily to hourly #8006

Merged
merged 1 commit into from
May 16, 2024

Conversation

aspandey
Copy link
Contributor

@aspandey aspandey commented May 3, 2024

Changing conf to rotate the log file every hour if it meets minimum size criteria.

hourly
minsize 10
maxsize 50k

It means that for every hour (01:00 AM, 02:00 AM and so on) when logrotate is called, it will see if the size of the log is atleast 10 bytes or not. If it is, it will rotate the logs.

maxsize makes sure that if the log size is 50k or more than as soon as logrotate is executed this log will be rotated. Even if it happens every minute or 5 minutes or so.

@@ -30,8 +30,9 @@

/var/log/bucket_logs.log
{
daily
size 100k
hourly
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hourly check is needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@naveenpaul1 yes, Actually these logs should be uploaded to log buckets and which would be consumed by other process. Its not only when some bug happens. These are logs for bucket operations.

@naveenpaul1
Copy link
Contributor

LGTM

Copy link
Contributor

@vh05 vh05 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

Changing conf to rotate the log file every hour if it meets
minimum size criteria.

hourly
minsize 10
maxsize 50k

It means that for every hour (01:00 AM, 02:00 AM and so on) when
logrotate is called, it will see if the size of the log is atleast
10 bytes or not. If it is, it will rotate the logs.

maxsize makes sure that if the log size is 50k or more than as soon
as logrotate is executed this log will be rotated. Even if it happens
every minute or 5 minutes or so.

Signed-off-by: Ashish Pandey <aspandey@redhat.com>
@aspandey aspandey merged commit 22d6109 into noobaa:master May 16, 2024
10 checks passed
@aspandey aspandey deleted the hourly-logrotate branch May 16, 2024 06:54
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.

None yet

3 participants