floptical
floptical

Reputation: 11

How to send logs to Journalctl when default is sent to syslog?

I have an older daemon process that I don't think has been "systemd'ed" as it were and I don't know how to send logs from it to journalctl, nor have I been able to find the answer anywhere. I've encountered this issue with several daemon processes under systemd. I'm currently attempting to troubleshoot "smokeping" on my updated Arch Linux install, and it has a line like this:

# specify this to get syslog logging
syslogfacility = local0

So, how do I send logs to journalctl? Additionally, how does journalctl even collect and store journal logs? '/var/log/journal' doesn't look to be formatted with anything sensible. man systemd-journald.service says it will index logs:

'Simple system log messages, via the libc syslog(3) call'

How would such a call look for my smokeping config file?

Thanks for any insight into this!

Upvotes: 1

Views: 2689

Answers (1)

Giuseppe Gorgoglione
Giuseppe Gorgoglione

Reputation: 329

In all modern Linux distributions adopting the systemd's set of tools, journald daemon transparently replaces rsyslog and catches all system logs by default (see journald manual: https://www.freedesktop.org/software/systemd/man/systemd-journald.service.html). You need to perform additional configuration only if you want to run journald and rsyslog daemons in parallel and make journald to forward all messages to rsyslog).

Upvotes: 1

Related Questions