1.2 KiB
1.2 KiB
Centralized logging
arlog.srv.it-syndikat.org
runs systemd-journal-remote
.
Client configuration
Assuming the client is named clientsrv
:
- On debian, install
systemd-journal-remote
. - In
/etc/systemd/journal-upload.conf
:[Upload] URL=https://arlog.srv.it-syndikat.org ServerKeyFile=/run/credentials/systemd-journal-upload.service/privkey ServerCertificateFile=/etc/systemd/journal-upload-cert.pem TrustedCertificateFile=/etc/ssl/certs/ca-certificates.crt
systemctl edit systemd-journal-upload.service
, add:[Service] LoadCredential=privkey:/etc/systemd/journal-upload-privkey.pem
- On
arlog.srv.it-syndikat.org
:- Run
sudo /usr/local/bin/generate_client_cert clientsrv /tmp/journal-upload-privkey.pem
- Copy
/etc/systemd/journal-remote-client-certs/clientsrv.pem
to/etc/systemd/journal-upload-cert.pem
onclientsrv
- Copy
/tmp/journal-upload-privkey.pem
to/etc/systemd/journal-upload-privkey.pem
onclientsrv
(ensure chmod 600)
- Run
systemctl enable --now systemd-journal-upload.service
- Optionally reduce local journal retention - in
/etc/systemd/journald.conf
:[Journal] MaxRetentionSec=2h MaxFileSec=1h