Interview Prep/Shell Scripting/Troubleshooting: cron and systemd timers

`journalctl -u opskit-health` returns nothing for your user, and prints `Hint: You are currently not seeing messages from other users and the system. Users in groups 'adm', 'systemd-journal' can see all messages.`

BeginnerTroubleshootingTroubleshooting: cron and systemd timers
Answer

Likely causes → System journal entries are readable only by root and members of systemd-journal (and adm or wheel on some distros). The logs exist; your user cannot read them.

Diagnose →

id                                     # are you in systemd-journal / adm?
sudo journalctl -u opskit-health -n 20 # confirms the entries exist

Fix → Use sudo journalctl ..., or add on-call engineers to the group (takes effect at next login):

sudo usermod -aG systemd-journal alice

Prevent → Ship logs to a central system (journald forwarding, Vector, Fluent Bit) so nobody needs shell access to read job output, and document the group in the runbook.

All Shell Scripting questions Roadmap: Shell scripting (Bash)

More on Troubleshooting: cron and systemd timers