1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242
|
'\" t
.TH "SYSTEMD\-JOURNAL\-UPLOAD\&.SERVICE" "8" "" "systemd 241" "systemd-journal-upload.service"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
systemd-journal-upload.service, systemd-journal-upload \- Send journal messages over the network
.SH "SYNOPSIS"
.PP
systemd\-journal\-upload\&.service
.HP \w'\fB/usr/lib/systemd/systemd\-journal\-upload\fR\ 'u
\fB/usr/lib/systemd/systemd\-journal\-upload\fR [OPTIONS...] [\-u/\-\-url=\fIURL\fR] [SOURCES...]
.SH "DESCRIPTION"
.PP
\fBsystemd\-journal\-upload\fR
will upload journal entries to the URL specified with
\fB\-\-url=\fR\&. This program reads journal entries from one or more journal files, similarly to
\fBjournalctl\fR(1)\&. 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\&.
.PP
systemd\-journal\-upload\&.service
is a system service that uses
\fBsystemd\-journal\-upload\fR
to upload journal entries to a server\&. It uses the configuration in
\fBjournal-upload.conf\fR(5)\&. At least the
\fIURL=\fR
option must be specified\&.
.SH "OPTIONS"
.PP
\fB\-u\fR, \fB\-\-url=\fR\fB[https://]\fR\fB\fIURL\fR\fR\fB[:\fR\fB\fIPORT\fR\fR\fB]\fR, \fB\-\-url=\fR\fB[http://]\fR\fB\fIURL\fR\fR\fB[:\fR\fB\fIPORT\fR\fR\fB]\fR
.RS 4
Upload to the specified address\&.
\fIURL\fR
may specify either just the hostname or both the protocol and hostname\&.
\fBhttps\fR
is the default\&. The port number may be specified after a colon (":"), otherwise
\fB19532\fR
will be used by default\&.
.RE
.PP
\fB\-\-system\fR, \fB\-\-user\fR
.RS 4
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
\fB\-\-system\fR
and
\fB\-\-user\fR
options for
\fBjournalctl\fR(1)\&. If neither is specified, all accessible entries are uploaded\&.
.RE
.PP
\fB\-m\fR, \fB\-\-merge\fR
.RS 4
Upload entries interleaved from all available journals, including other machines\&. This has the same meaning as
\fB\-\-merge\fR
option for
\fBjournalctl\fR(1)\&.
.RE
.PP
\fB\-D\fR, \fB\-\-directory=\fR\fB\fIDIR\fR\fR
.RS 4
Takes a directory path as argument\&. Upload entries from the specified journal directory
\fIDIR\fR
instead of the default runtime and system journal paths\&. This has the same meaning as
\fB\-\-directory=\fR
option for
\fBjournalctl\fR(1)\&.
.RE
.PP
\fB\-\-file=\fR\fB\fIGLOB\fR\fR
.RS 4
Takes a file glob as an argument\&. Upload entries from the specified journal files matching
\fIGLOB\fR
instead 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
\fB\-\-file=\fR
option for
\fBjournalctl\fR(1)\&.
.RE
.PP
\fB\-\-cursor=\fR
.RS 4
Upload entries from the location in the journal specified by the passed cursor\&. This has the same meaning as
\fB\-\-cursor=\fR
option for
\fBjournalctl\fR(1)\&.
.RE
.PP
\fB\-\-after\-cursor=\fR
.RS 4
Upload entries from the location in the journal
\fIafter\fR
the location specified by the this cursor\&. This has the same meaning as
\fB\-\-after\-cursor=\fR
option for
\fBjournalctl\fR(1)\&.
.RE
.PP
\fB\-\-save\-state\fR[=\fIPATH\fR]
.RS 4
Upload entries from the location in the journal
\fIafter\fR
the location specified by the cursor saved in file at
\fIPATH\fR
(/var/lib/systemd/journal\-upload/state
by default)\&. After an entry is successfully uploaded, update this file with the cursor of that entry\&.
.RE
.PP
\fB\-\-follow\fR[=\fIBOOL\fR]
.RS 4
If set to yes, then
\fBsystemd\-journal\-upload\fR
waits for input\&.
.RE
.PP
\fB\-\-key=\fR
.RS 4
Takes a path to a SSL key file in PEM format\&. Defaults to
/etc/ssl/private/journal\-upload\&.pem\&.
.RE
.PP
\fB\-\-cert=\fR
.RS 4
Takes a path to a SSL certificate file in PEM format\&. Defaults to
/etc/ssl/certs/journal\-upload\&.pem\&.
.RE
.PP
\fB\-\-trust=\fR
.RS 4
Takes a path to a SSL CA certificate file in PEM format, or
\fBall\fR\&. If
\fBall\fR
is set, then certificate checking will be disabled\&. Defaults to
/etc/ssl/ca/trusted\&.pem\&.
.RE
.PP
\fB\-h\fR, \fB\-\-help\fR
.RS 4
Print a short help text and exit\&.
.RE
.PP
\fB\-\-version\fR
.RS 4
Print a short version string and exit\&.
.RE
.SH "EXIT STATUS"
.PP
On success, 0 is returned; otherwise, a non\-zero failure code is returned\&.
.SH "EXAMPLES"
.PP
\fBExample\ \&1.\ \&Setting up certificates for authentication\fR
.PP
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\&.
.PP
A suitable set of certificates can be generated with
\fBopenssl\fR\&. Note, 2048 bits of key length is minimally recommended to use for security reasons:
.sp
.if n \{\
.RS 4
.\}
.nf
openssl req \-newkey rsa:2048 \-days 3650 \-x509 \-nodes \e
\-out ca\&.pem \-keyout ca\&.key \-subj \*(Aq/CN=Certificate authority/\*(Aq
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:2048 \-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:2048 \-nodes \-out $CLIENT\&.csr \-keyout $CLIENT\&.key \-subj "/CN=$CLIENT/"
openssl ca \-batch \-config ca\&.conf \-notext \-in $CLIENT\&.csr \-out $CLIENT\&.pem
.fi
.if n \{\
.RE
.\}
.PP
Generated files
ca\&.pem,
server\&.pem, and
server\&.key
should be installed on server, and
ca\&.pem,
client\&.pem, and
client\&.key
on the client\&. The location of those files can be specified using
\fITrustedCertificateFile=\fR,
\fIServerCertificateFile=\fR,
\fIServerKeyFile=\fR, in
/etc/systemd/journal\-remote\&.conf
and
/etc/systemd/journal\-upload\&.conf, respectively\&. The default locations can be queried by using
\fBsystemd\-journal\-remote \-\-help\fR
and
\fBsystemd\-journal\-upload \-\-help\fR\&.
.SH "SEE ALSO"
.PP
\fBjournal-upload.conf\fR(5),
\fBsystemd-journal-remote.service\fR(8),
\fBjournalctl\fR(1),
\fBsystemd-journald.service\fR(8),
\fBsystemd-journal-gatewayd.service\fR(8)
|