Skip to content

Add logrotate configuration to rotate /var/log/messages #89

Merged
merged 1 commit into from
May 16, 2019

Conversation

donald
Copy link
Collaborator

@donald donald commented May 13, 2019

PR open for discussion of the policy, too. Don't merge, until everyone had a chance to throw in his 5 cent.

@pmenzel
Copy link
Contributor

pmenzel commented May 13, 2019

  1. Are the service and timer from the upstream logrotate archive?
  2. Do we want to compress the rotated archives?

Could somebody write a little more to the motivation? Current /var/log/messages gets too big? Is there a space issue?

Suggestion: Rotate yearly, and do not compress.

@wwwutz
Copy link
Contributor

wwwutz commented May 13, 2019

  1. Why do you ask ?
  2. No we do not.

Motivation: Rotating logs is a good thing.

Monthly rotation was the result of a lengthy, hard and very emotional discussion. Blood has been shed and wounds are healing. Please do not reach out for salt.

Compression is a waste of CPU.

@donald
Copy link
Collaborator Author

donald commented May 13, 2019

Are the service and timer from the upstream logrotate archive?

Yes. https://github.com/logrotate/logrotate/tree/master/examples

Could somebody write a little more to the motivation? Current /var/log/messages gets too big? Is there a space issue?

Yes. And it takes ages to grep something. And an ever-growing /var/log/messages can not be deduplicated on the backup storage, unlike read-only monthly archives.

@donald
Copy link
Collaborator Author

donald commented May 14, 2019

force-pushed, just because I didn't forgot ti commit my last chnage ( rotate 11 -> rotate 12 )

Add logrotate.conf, logrotate.service and logrotate.timer to rotate and
purge /var/log/messages.

With this logrotate.conf, we rotate every month and keep 12 rotated
files. So on Jun 1, 2019, /var/log/messages is rotated to
/var/log/messages.2019-05 and /var/log/messages.2018-05 would be
deleted, if it existed.
@donald
Copy link
Collaborator Author

donald commented May 16, 2019

So one voice not to compress and no vetos. I merge w/o compression. Let's see, what happens on Jun 1st.

@donald donald merged commit 80fc7e2 into master May 16, 2019
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants