Foreman services deployed by foremanctl are managed by systemd and write
their logs to the system journal. Use journalctl directly to inspect and
follow them.
List the services that belong to the Foreman systemd target:
systemctl list-dependencies --plain foreman.targetTo find services that failed to start, use:
systemctl --failedforeman.target is only a grouping unit and does not run an application
process, so it has no application logs of its own.
journalctl -u foreman.target can still display records associated with the
target, including systemd-generated messages about it, but it does not
aggregate messages from services listed as target dependencies.
Display the last 50 messages from the Foreman application:
journalctl --no-pager -n 50 -u foreman.serviceInspect several related services together:
journalctl --no-pager -n 200 \
-u foreman.service \
-u 'dynflow-sidekiq@*.service'Common service units include:
foreman.serviceforeman-proxy.servicedynflow-sidekiq@orchestrator.servicedynflow-sidekiq@worker.servicedynflow-sidekiq@worker-hosts-queue.servicepulp-api.servicepulp-content.servicepulp-worker@*.servicecandlepin.servicehttpd.servicevalkey.servicepostgresql.service
The exact set depends on the enabled deployment features. Use
systemctl list-dependencies to confirm the units present on a particular
system.
Follow a service in real time:
journalctl -f -u foreman.serviceFollow Foreman and its Dynflow workers together:
journalctl -f \
-u foreman.service \
-u 'dynflow-sidekiq@*.service'Press Ctrl+C to stop following the journal.
Show messages from the last hour:
journalctl --since '1 hour ago' -u foreman.serviceShow journal entries with error priority or higher:
journalctl -p err -u foreman.serviceShow logs from the current boot:
journalctl -b -u foreman.serviceCombine these options as needed. For example:
journalctl --no-pager -b -p warning --since '30 minutes ago' \
-u foreman.service \
-u 'dynflow-sidekiq@*.service'