fgci-org / fgci-ansible

:microscope: Collection of the Finnish Grid and Cloud Infrastructure Ansible playbooks
MIT License
54 stars 18 forks source link

Increase journald retention period of some logs #122

Closed martbhell closed 8 years ago

martbhell commented 8 years ago

How long are logs stored in journalctld? It would be nice to be able to increase the retention for some types of logs. I do not know if this is even possible or if it's an all or nothing setting.

martbhell commented 8 years ago

Currently journals are not saved, they are only stored in memory.

# journalctl --list-boots
 0 id0 Wed 2016-08-24 08:30:21 EEST—Wed 2016-08-24 09:18:32 EEST
  1. mkdir /var/log/journal
  2. rebooted (still only one)
  3. another reboot (now it has two)
# journalctl --list-boots
-1 id1 Wed 2016-08-24 09:21:11 EEST—Wed 2016-08-24 09:23:41 EEST
 0 id2 Wed 2016-08-24 09:25:30 EEST—Wed 2016-08-24 09:26:35 EEST

Looking at https://github.com/CSC-IT-Center-for-Science/ansible-systemd-journal to create that directory.

martbhell commented 8 years ago

Using that since f7982a7f9391b4241b56f50a6c37a2221813ba94