Skip to content

Add logging max size and count for rotation #2229

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

Merged
merged 3 commits into from
Feb 25, 2021
Merged

Conversation

rjeberhard
Copy link
Member

Resolves issue #2220.

I took a hand wave at the appropriate defaults and selected max file size of 1 MB and 7 total files in the rotation.

@@ -53,6 +53,10 @@ spec:
value: "false"
- name: "JAVA_LOGGING_LEVEL"
value: {{ .javaLoggingLevel | quote }}
- name: "JAVA_LOGGING_MAXSIZE"
value: {{ .javaLoggingFileSizeLimit | default 1000000 | quote }}
Copy link
Member

Choose a reason for hiding this comment

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

Should we make the default 10MB to match with Kubernetes default (based on this - https://kubernetes.io/docs/concepts/cluster-administration/logging/#logging-at-the-node-level)?

Copy link
Member Author

Choose a reason for hiding this comment

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

For Kubernetes, you get by default the last 10 MB of the pod output. Here, we have seven files each of 1 MB. I could match the Kubernetes behavior by changing the number of files from 7 to 10.

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't really feel strongly about these defaults, so I'm happy to adjust to the group consensus.

Copy link
Member

Choose a reason for hiding this comment

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

Ok, I feel going from no max size to 1MB might be a big change for customers. I vote for 10MB as that might cover the majority of use-cases without a need for log rotation.

Copy link

@tbarnes-us tbarnes-us Feb 25, 2021

Choose a reason for hiding this comment

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

Assuming we need 10,000 domains at 50K each at the default INFO level (since a simple relatively inactive domain yields a "few k" of log data at the INFO level), gives us 500 MB. So 10MB X 7 'feels' a little too small too me.

Copy link

@tbarnes-us tbarnes-us Feb 25, 2021

Choose a reason for hiding this comment

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

Unless 1,000 domains is the target? In which case 10MB X 7 looks about right to me...

Copy link
Member Author

Choose a reason for hiding this comment

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

How about 20MB x 10?

Choose a reason for hiding this comment

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

Close enough for me.

@tbarnes-us

This comment has been minimized.

Copy link

@tbarnes-us tbarnes-us left a comment

Choose a reason for hiding this comment

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

Approving. I'm assuming 'logstash' is going to be understanding about this change.

Copy link
Member

@ankedia ankedia left a comment

Choose a reason for hiding this comment

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

LGTM

@rjeberhard rjeberhard merged commit 2f58b73 into develop Feb 25, 2021
@tbarnes-us tbarnes-us mentioned this pull request Mar 29, 2021
@rjeberhard rjeberhard deleted the logstash-rotate branch January 31, 2022 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants