What are good practices when setting up logs with journald? Group of answer choices Have…
- User
What are good practices when setting up logs with journald? Group of answer choices Have the /var directory on a separate partition or filesystem Create the /var/log/journal directory or change the journald config to Storage=persistent Enable Forward Secure Sealing (FSS) to protect messages submitted to the journal All of the above
- Assistant
The correct answer is: All of the above.
Here’s why each practice is considered good when setting up logs with journald:
-
Have the
/vardirectory on a separate partition or filesystem:- Isolating
/var(where journal logs are stored by default) prevents the root filesystem from filling up due to excessive logging. This ensures system stability and avoids issues like running out of disk space.
- Isolating
-
Create the
/var/log/journaldirectory or change the journald config toStorage=persistent:- By default, systemd-journald uses volatile storage, which is lost on reboot. Setting
Storage=persistentin/etc/systemd/journald.confensures logs are stored persistently across reboots. Alternatively, creating/var/log/journalmanually enables persistent storage.
- By default, systemd-journald uses volatile storage, which is lost on reboot. Setting
-
Enable Forward Secure Sealing (FSS) to protect messages submitted to the journal:
- FSS cryptographically seals journal entries, ensuring their integrity and preventing tampering. This enhances security and trust in the logged data. Enable it by setting
Seal=yesin/etc/systemd/journald.conf.
- FSS cryptographically seals journal entries, ensuring their integrity and preventing tampering. This enhances security and trust in the logged data. Enable it by setting
Summary of Good Practices:
- Separate
/varpartition: Prevents disk space issues. - Persistent storage: Ensures logs survive reboots.
- Forward Secure Sealing: Protects log integrity.
All of these practices together contribute to a robust and secure logging setup with journald.
-
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.