Signal9Signal9 — home
online
back to labs

Logging Pipeline: rsyslog Routing, logrotate & Persistent Journal

MediumRHCSA Prep25-35 min
The brief

A new application needs a proper logging pipeline, and the box currently keeps no persistent journal. Your per-session assignment is in /root/case/assignment.env (FACILITY, LOGFILE, ROTATE_COUNT, ROTATE_INTERVAL); read it and set up logging to match.

Three tasks:

1. rsyslog routing — create a rule under /etc/rsyslog.d/ that sends the assigned FACILITY (all priorities) to LOGFILE. A rule is <facility>.*<tab or spaces><logfile>.

2. logrotate — add a policy under /etc/logrotate.d/ for LOGFILE: rotate it ROTATE_INTERVAL, keep ROTATE_COUNT copies (rotate <n>), and compress.

3. Persistent journal — make the systemd journal survive reboots: set Storage=persistent in /etc/systemd/journald.conf and create /var/log/journal.

Graded on the resulting configuration state, so editing the files directly or using the tools both work.

What you'll do
  • Route an rsyslog facility to a dedicated log file
  • Write a logrotate policy with the assigned interval and retention count
  • Make the systemd journal persistent (Storage=persistent + /var/log/journal)
  • Read the per-session assignment and apply all three to spec

Hands-on lab: you work on a real Linux box in your browser, graded on the machine's actual state.