systemd-journal-upload man page
systemd-journal-upload — Send journal messages over the network
systemd-journal-upload [Options...] [-u/--url=URL] [SOURCES...]
systemd-journal-upload will upload journal entries to the URL specified with --url. Unless limited by one of the options specified below, all journal entries accessible to the user the program is running as will be uploaded, and then the program will wait and send new entries as they become available.
- -u, --url=[https://]
- Upload to the specified address.
URLmay specify either just the hostname or both the protocol and hostname.
httpsis the default.
- --system, --user
- Limit uploaded entries to entries from system services and the kernel, or to entries from services of current user. This has the same meaning as --system and --user options for journalctl(1). If neither is specified, all accessible entries are uploaded.
- -m, --merge
- Upload entries interleaved from all available journals, including other machines. This has the same meaning as --merge option for journalctl(1).
- -D, --directory=
- Takes a directory path as argument. Upload entries from the specified journal directory
DIRinstead of the default runtime and system journal paths. This has the same meaning as --directory option for journalctl(1).
- Takes a file glob as an argument. Upload entries from the specified journal files matching
GLOBinstead of the default runtime and system journal paths. May be specified multiple times, in which case files will be suitably interleaved. This has the same meaning as --file option for journalctl(1).
- Upload entries from the location in the journal specified by the passed cursor. This has the same meaning as --cursor option for journalctl(1).
- Upload entries from the location in the journal after the location specified by the this cursor. This has the same meaning as --after-cursor option for journalctl(1).
- Upload entries from the location in the journal after the location specified by the cursor saved in file at
/var/lib/systemd/journal-upload/stateby default). After an entry is successfully uploaded, update this file with the cursor of that entry.
- -h, --help
- Print a short help text and exit.
- Print a short version string and exit.
On success, 0 is returned; otherwise, a non-zero failure code is returned.
Example 1. Setting up certificates for authentication
Certificates signed by a trusted authority are used to verify that the server to which messages are uploaded is legitimate, and vice versa, that the client is trusted.
A suitable set of certificates can be generated with
openssl req -newkey rsa:2048 -days 3650 -x509 -nodes \ -out ca.pem -keyout ca.key -subj '/CN=Certificate authority/' cat >ca.conf <<EOF [ ca ] default_ca = this [ this ] new_certs_dir = . certificate = ca.pem database = ./index private_key = ca.key serial = ./serial default_days = 3650 default_md = default policy = policy_anything [ policy_anything ] countryName = optional stateOrProvinceName = optional localityName = optional organizationName = optional organizationalUnitName = optional commonName = supplied emailAddress = optional EOF touch index echo 0001 > serial SERVER=server CLIENT=client openssl req -newkey rsa:1024 -nodes -out $SERVER.csr -keyout $SERVER.key -subj "/CN=$SERVER/" openssl ca -batch -config ca.conf -notext -in $SERVER.csr -out $SERVER.pem openssl req -newkey rsa:1024 -nodes -out $CLIENT.csr -keyout $CLIENT.key -subj "/CN=$CLIENT/" openssl ca -batch -config ca.conf -notext -in $CLIENT.csr -out $CLIENT.pem
server.key should be installed on server, and
client.key on the client. The location of those files can be specified using TrustedCertificateFile=, ServerCertificateFile=, ServerKeyFile=, in
/etc/systemd/journal-upload.conf respectively. The default locations can be queried by using
systemd-journal-remote --help and
systemd-journal-remote(8), journalctl(1), systemd-journald.service(8), systemd-journal-gatewayd.service(8)
systemd.directives(7), systemd.index(7), systemd-journal-remote(8).
Explore man page connections for systemd-journal-upload(8).