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 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317
|
'\" t
.TH "SYSTEMD\-JOURNAL\-REMOTE\&.SERVICE" "8" "" "systemd 241" "systemd-journal-remote.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-remote.service, systemd-journal-remote.socket, systemd-journal-remote \- Receive journal messages over the network
.SH "SYNOPSIS"
.PP
systemd\-journal\-remote\&.service
.PP
systemd\-journal\-remote\&.socket
.HP \w'\fB/usr/lib/systemd/systemd\-journal\-remote\fR\ 'u
\fB/usr/lib/systemd/systemd\-journal\-remote\fR [OPTIONS...] [\-o/\-\-output=\fIDIR\fR|\fIFILE\fR] [SOURCES...]
.SH "DESCRIPTION"
.PP
\fBsystemd\-journal\-remote\fR
is a command to receive serialized journal events and store them to journal files\&. Input streams are in the
\m[blue]\fBJournal Export Format\fR\m[]\&\s-2\u[1]\d\s+2, i\&.e\&. like the output from
\fBjournalctl \-\-output=export\fR\&. For transport over the network, this serialized stream is usually carried over an HTTPS connection\&.
.PP
systemd\-journal\-remote\&.service
is a system service that uses
\fBsystemd\-journal\-remote\fR
to listen for connections\&.
systemd\-journal\-remote\&.socket
configures the network address that
systemd\-journal\-remote\&.service
listens on\&. By default this is port 19532\&. What connections are accepted and how the received data is stored can be configured through the
\fBjournal-remote.conf\fR(5)
configuration file\&.
.SH "SOURCES"
.PP
Sources can be either "active" (\fBsystemd\-journal\-remote\fR
requests and pulls the data), or "passive" (\fBsystemd\-journal\-remote\fR
waits for a connection and then receives events pushed by the other side)\&.
.PP
\fBsystemd\-journal\-remote\fR
can read more than one event stream at a time\&. They will be interleaved in the output file\&. In case of "active" connections, each "source" is one stream, and in case of "passive" connections, each connection can result in a separate stream\&. Sockets can be configured in "accept" mode (i\&.e\&. only one connection), or "listen" mode (i\&.e\&. multiple connections, each resulting in a stream)\&.
.PP
When there are no more connections, and no more can be created (there are no listening sockets), then
\fBsystemd\-journal\-remote\fR
will exit\&.
.PP
Active sources can be specified in the following ways:
.PP
[SOURCES...]
.RS 4
When
\fB\-\fR
is given as a positional argument, events will be read from standard input\&. Other positional arguments will be treated as filenames to open and read from\&.
.RE
.PP
\fB\-\-url=\fR\fB\fIADDRESS\fR\fR
.RS 4
With the
\fB\-\-url=\fR\fB\fIADDRESS\fR\fR
option, events will be retrieved using HTTP from
\fIADDRESS\fR\&. This URL should refer to the root of a remote
\fBsystemd-journal-gatewayd\fR(8)
instance, e\&.g\&. http://some\&.host:19531/ or https://some\&.host:19531/\&.
.RE
.PP
\fB\-\-getter=\*(Aq\fR\fB\fIPROG\fR\fR\fB \fR\fB[OPTIONS...]\fR\fB\*(Aq\fR
.RS 4
Program to invoke to retrieve data\&. The journal event stream must be generated on standard output\&.
.sp
Examples:
.sp
.if n \{\
.RS 4
.\}
.nf
\-\-getter=\*(Aqcurl "\-HAccept: application/vnd\&.fdo\&.journal" https://some\&.host:19531/\*(Aq
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\-\-getter=\*(Aqwget \-\-header="Accept: application/vnd\&.fdo\&.journal" \-O\- https://some\&.host:19531/\*(Aq
.fi
.if n \{\
.RE
.\}
.RE
.PP
Passive sources can be specified in the following ways:
.PP
\fB\-\-listen\-raw=\fR\fB\fIADDRESS\fR\fR
.RS 4
\fIADDRESS\fR
must be an address suitable for
\fBListenStream=\fR
(cf\&.
\fBsystemd.socket\fR(5))\&.
\fBsystemd\-journal\-remote\fR
will listen on this socket for connections\&. Each connection is expected to be a stream of journal events\&.
.RE
.PP
\fB\-\-listen\-http=\fR\fB\fIADDRESS\fR\fR, \fB\-\-listen\-https=\fR\fB\fIADDRESS\fR\fR
.RS 4
\fIADDRESS\fR
must be either a negative integer, in which case it will be interpreted as the (negated) file descriptor number, or an address suitable for
\fBListenStream=\fR
(c\&.f\&.
\fBsystemd.socket\fR(5))\&. In the first case, the server listens on port 19532 by default, and the matching file descriptor must be inherited through
\fI$LISTEN_FDS\fR/\fI$LISTEN_PID\fR\&. In the second case, an HTTP or HTTPS server will be spawned on this port, respectively for
\fB\-\-listen\-http=\fR
and
\fB\-\-listen\-https=\fR\&. Currently, only POST requests to
/upload
with
"Content\-Type: application/vnd\&.fdo\&.journal"
are supported\&.
.RE
.PP
\fI$LISTEN_FDS\fR
.RS 4
\fBsystemd\-journal\-remote\fR
supports the
\fI$LISTEN_FDS\fR/\fI$LISTEN_PID\fR
protocol\&. Open sockets inherited through socket activation behave like those opened with
\fB\-\-listen\-raw=\fR
described above, unless they are specified as an argument in
\fB\-\-listen\-http=\-\fR\fB\fIn\fR\fR
or
\fB\-\-listen\-https=\-\fR\fB\fIn\fR\fR
above\&. In the latter case, an HTTP or HTTPS server will be spawned using this descriptor and connections must be made over the HTTP protocol\&.
.RE
.PP
\fB\-\-key=\fR
.RS 4
Takes a path to a SSL key file in PEM format\&. Defaults to
/etc/ssl/private/journal\-remote\&.pem\&. This option can be used with
\fB\-\-listen\-https=\fR\&.
.RE
.PP
\fB\-\-cert=\fR
.RS 4
Takes a path to a SSL certificate file in PEM format\&. Defaults to
/etc/ssl/certs/journal\-remote\&.pem\&. This option can be used with
\fB\-\-listen\-https=\fR\&.
.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\&. This option can be used with
\fB\-\-listen\-https=\fR\&.
.RE
.PP
\fB\-\-gnutls\-log=\fR
.RS 4
Takes a comma separated list of gnutls logging categories\&. This option can be used with
\fB\-\-listen\-http=\fR
or
\fB\-\-listen\-https=\fR\&.
.RE
.SH "SINKS"
.PP
The location of the output journal can be specified with
\fB\-o\fR
or
\fB\-\-output=\fR\&.
.PP
\fB\-\-output=\fR\fB\fIFILE\fR\fR
.RS 4
Will write to this journal file\&. The filename must end with
\&.journal\&. The file will be created if it does not exist\&. If necessary (journal file full, or corrupted), the file will be renamed following normal journald rules and a new journal file will be created in its stead\&.
.RE
.PP
\fB\-\-output=\fR\fB\fIDIR\fR\fR
.RS 4
Will create journal files underneath directory
\fIDIR\fR\&. The directory must exist\&. If necessary (journal files over size, or corrupted), journal files will be rotated following normal journald rules\&. Names of files underneath
\fIDIR\fR
will be generated using the rules described below\&.
.RE
.PP
If
\fB\-\-output=\fR
is not used, the output directory
/var/log/journal/remote/
will be used\&. In case the output file is not specified, journal files will be created underneath the selected directory\&. Files will be called
remote\-\fIhostname\fR\&.journal, where the
\fIhostname\fR
part is the escaped hostname of the source endpoint of the connection, or the numerical address if the hostname cannot be determined\&.
.PP
In the case that "active" sources are given by the positional arguments or
\fB\-\-getter=\fR
option, the output file name must always be given explicitly\&.
.SH "OPTIONS"
.PP
The following options are understood:
.PP
\fB\-\-split\-mode\fR
.RS 4
One of
\fBnone\fR
or
\fBhost\fR\&. For the first, only one output journal file is used\&. For the latter, a separate output file is used, based on the hostname of the other endpoint of a connection\&.
.sp
In the case that "active" sources are given by the positional arguments or
\fB\-\-getter=\fR
option, the output file name must always be given explicitly and only
\fBnone\fR
is allowed\&.
.RE
.PP
\fB\-\-compress\fR [\fIBOOL\fR]
.RS 4
If this is set to
"yes"
then compress the data in the journal using XZ\&. The default is
"yes"\&.
.RE
.PP
\fB\-\-seal\fR [\fIBOOL\fR]
.RS 4
If this is set to
"yes"
then periodically sign the data in the journal using Forward Secure Sealing\&. The default is
"no"\&.
.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 "EXAMPLES"
.PP
Copy local journal events to a different journal directory:
.sp
.if n \{\
.RS 4
.\}
.nf
journalctl \-o export | systemd\-journal\-remote \-o /tmp/dir/foo\&.journal \-
.fi
.if n \{\
.RE
.\}
.PP
Retrieve all available events from a remote
\fBsystemd-journal-gatewayd\fR(8)
instance and store them in
/var/log/journal/remote/remote\-some\&.host\&.journal:
.sp
.if n \{\
.RS 4
.\}
.nf
systemd\-journal\-remote \-\-url http://some\&.host:19531/
.fi
.if n \{\
.RE
.\}
.PP
Retrieve current boot events and wait for new events from a remote
\fBsystemd-journal-gatewayd\fR(8)
instance, and store them in
/var/log/journal/remote/remote\-some\&.host\&.journal:
.sp
.if n \{\
.RS 4
.\}
.nf
systemd\-journal\-remote \-\-url http://some\&.host:19531/entries?boot&follow
.fi
.if n \{\
.RE
.\}
.sp
.SH "SEE ALSO"
.PP
\fBjournal-remote.conf\fR(5),
\fBjournalctl\fR(1),
\fBsystemd-journal-gatewayd.service\fR(8),
\fBsystemd-journal-upload.service\fR(8),
\fBsystemd-journald.service\fR(8)
.SH "NOTES"
.IP " 1." 4
Journal Export Format
.RS 4
\%https://www.freedesktop.org/wiki/Software/systemd/export
.RE
|