Score:0

Rotate Logs of systemd-journal-remote

kg flag

I am running Ubuntu 22.02 with systemd-journal-remote version 249.11-0ubuntu3.6. The hard drive was full because log rotation was not set-up. To manage file size of journals I updated my config at /etc/systemd/journal-remote.conf.d/01-central-log.conf with the two attributes MaxFiles and MaxUse. Unfortunately these attributes are not respected and the following error is thrown when I restart the systemd-journal-remote service:

Jan 27 10:20:11 log-server systemd-journal-remote[949021]: /etc/systemd/journal-remote.conf:18: Unknown key name 'MaxUse' in section 'Remote', ignoring.
Jan 27 10:20:11 log-server systemd-journal-remote[949021]: /etc/systemd/journal-remote.conf:18: Unknown key name 'MaxFiles' in section 'Remote', ignoring.

I have also tried updating /etc/systemd/journal-remote.conf directly. Same outcome

Here is my config at /etc/systemd/journal-remote.conf.d/01-central-log.conf

#  This file overrides /etc/systemd/journal-remote.conf

[Remote]
# keep only 20 journal files as we have 20 logging servers
# MaxFiles only effects archives. Journal files that are used are not deleted!
MaxFiles=20
# Limit size of Journals to 20GB in total
MaxUse=20G

I have found and verified that the attribute is MaxUse and not SystemMaxUse as it is for the system wide setting. Found in the manual here and also in source.

Can someone help me what I am doing wrong?

Score:0
kg flag

I received an answer from a user of the systemd newsgroup. The configuration attributes are correct and placed in the right files.

Trouble is, as he mentioned that the freedesktop man page "reflect either the latest state of the main branch, or the newest tag". So the website shows a documentation of a version that is not being shipped yet by Linux distributors.

So for anyone running into an issue as I did: Respect the appropriate man page version of your installed systemd software rather than using freedesktop man page: man journal-remote.conf

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.