{"id":3208,"date":"2022-12-20T16:43:49","date_gmt":"2022-12-20T19:43:49","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/systemdjournalremote-service-man8\/"},"modified":"2022-12-20T16:43:49","modified_gmt":"2022-12-20T19:43:49","slug":"systemdjournalremote-service-man8","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/systemdjournalremote-service-man8\/","title":{"rendered":"SYSTEMD&minus;JOURNAL&minus;REMOTE.SERVICE (man8)"},"content":{"rendered":"<h1 align=\"center\">SYSTEMD\u2212JOURNAL\u2212REMOTE.SERVICE<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#SOURCES\">SOURCES<\/a><br \/> <a href=\"#SINKS\">SINKS<\/a><br \/> <a href=\"#OPTIONS\">OPTIONS<\/a><br \/> <a href=\"#EXAMPLES\">EXAMPLES<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a><br \/> <a href=\"#NOTES\">NOTES<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">systemd-journal-remote.service, systemd-journal-remote.socket, systemd-journal-remote \u2212 Receive journal messages over the network<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">systemd\u2212journal\u2212remote.service<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">systemd\u2212journal\u2212remote.socket<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"89%\">\n<p style=\"margin-top: 1em\"><b>\/usr\/lib\/systemd\/systemd\u2212journal\u2212remote<\/b> [OPTIONS&#8230;] [\u2212o\/\u2212\u2212output=<i>DIR<\/i>|<i>FILE<\/i>] [SOURCES&#8230;]<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>systemd\u2212journal\u2212remote<\/b> is a command to receive serialized journal events and store them to journal files. Input streams are in the <b><font color=\"#0000FF\">Journal Export Format<\/font><\/b> <small><font color=\"#000000\">[1]<\/font><\/small> <font color=\"#000000\">, i.e. like the output from <b>journalctl \u2212\u2212output=export<\/b>. For transport over the network, this serialized stream is usually carried over an HTTPS connection.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">systemd\u2212journal\u2212remote.service is a system service that uses <b>systemd\u2212journal\u2212remote<\/b> to listen for connections. systemd\u2212journal\u2212remote.socket configures the network address that systemd\u2212journal\u2212remote.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 <b>journal-remote.conf<\/b>(5) configuration file.<\/font><\/p>\n<h2>SOURCES <a name=\"SOURCES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">Sources can be either &#8220;active&#8221; (<b>systemd\u2212journal\u2212remote<\/b> requests and pulls the data), or &#8220;passive&#8221; (<b>systemd\u2212journal\u2212remote<\/b> waits for a connection and then receives events pushed by the other side).<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>systemd\u2212journal\u2212remote<\/b> can read more than one event stream at a time. They will be interleaved in the output file. In case of &#8220;active&#8221; connections, each &#8220;source&#8221; is one stream, and in case of &#8220;passive&#8221; connections, each connection can result in a separate stream. Sockets can be configured in &#8220;accept&#8221; mode (i.e. only one connection), or &#8220;listen&#8221; mode (i.e. multiple connections, each resulting in a stream).<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">When there are no more connections, and no more can be created (there are no listening sockets), then <b>systemd\u2212journal\u2212remote<\/b> will exit.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">Active sources can be specified in the following ways:<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">[SOURCES&#8230;]<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">When <b>\u2212<\/b> 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.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>\u2212\u2212url=<\/b><i>ADDRESS<\/i><\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">With the <b>\u2212\u2212url=<\/b><i>ADDRESS<\/i> option, events will be retrieved using HTTP from <i>ADDRESS<\/i>. This URL should refer to the root of a remote <b>systemd-journal-gatewayd<\/b>(8) instance, e.g. http:\/\/some.host:19531\/ or https:\/\/some.host:19531\/.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>\u2212\u2212getter=&#8217;<\/b><i>PROG<\/i> <b>[OPTIONS&#8230;]&#8217;<\/b><\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Program to invoke to retrieve data. The journal event stream must be generated on standard output.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">Examples:<\/font><\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><font color=\"#000000\">\u2212\u2212getter=&#8217;curl &#8220;\u2212HAccept: application\/vnd.fdo.journal&#8221; https:\/\/some.host:19531\/&#8217;<\/font><\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><font color=\"#000000\">\u2212\u2212getter=&#8217;wget \u2212\u2212header=&#8221;Accept: application\/vnd.fdo.journal&#8221; \u2212O\u2212 https:\/\/some.host:19531\/&#8217;<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">Passive sources can be specified in the following ways:<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>\u2212\u2212listen\u2212raw=<\/b><i>ADDRESS<\/i><\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\"><i>ADDRESS<\/i> must be an address suitable for <b>ListenStream=<\/b> (cf. <b>systemd.socket<\/b>(5)). <b>systemd\u2212journal\u2212remote<\/b> will listen on this socket for connections. Each connection is expected to be a stream of journal events.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>\u2212\u2212listen\u2212http=<\/b><i>ADDRESS<\/i>, <b>\u2212\u2212listen\u2212https=<\/b><i>ADDRESS<\/i><\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\"><i>ADDRESS<\/i> must be either a negative integer, in which case it will be interpreted as the (negated) file descriptor number, or an address suitable for <b>ListenStream=<\/b> (c.f. <b>systemd.socket<\/b>(5)). In the first case, the server listens on port 19532 by default, and the matching file descriptor must be inherited through <i>$LISTEN_FDS<\/i>\/<i>$LISTEN_PID<\/i>. In the second case, an HTTP or HTTPS server will be spawned on this port, respectively for <b>\u2212\u2212listen\u2212http=<\/b> and <b>\u2212\u2212listen\u2212https=<\/b>. Currently, only POST requests to \/upload with &#8220;Content\u2212Type: application\/vnd.fdo.journal&#8221; are supported.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><i>$LISTEN_FDS<\/i><\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\"><b>systemd\u2212journal\u2212remote<\/b> supports the <i>$LISTEN_FDS<\/i>\/<i>$LISTEN_PID<\/i> protocol. Open sockets inherited through socket activation behave like those opened with <b>\u2212\u2212listen\u2212raw=<\/b> described above, unless they are specified as an argument in <b>\u2212\u2212listen\u2212http=\u2212<\/b><i>n<\/i> or <b>\u2212\u2212listen\u2212https=\u2212<\/b><i>n<\/i> 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.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>\u2212\u2212key=<\/b><\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Takes a path to a SSL key file in PEM format. Defaults to \/etc\/ssl\/private\/journal\u2212remote.pem. This option can be used with <b>\u2212\u2212listen\u2212https=<\/b>. If the path refers to an <b>AF_UNIX<\/b> stream socket in the file system a connection is made to it and the key read from it.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>\u2212\u2212cert=<\/b><\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Takes a path to a SSL certificate file in PEM format. Defaults to \/etc\/ssl\/certs\/journal\u2212remote.pem. This option can be used with <b>\u2212\u2212listen\u2212https=<\/b>. If the path refers to an <b>AF_UNIX<\/b> stream socket in the file system a connection is made to it and the certificate read from it.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>\u2212\u2212trust=<\/b><\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Takes a path to a SSL CA certificate file in PEM format, or <b>all<\/b>. If <b>all<\/b> is set, then certificate checking will be disabled. Defaults to \/etc\/ssl\/ca\/trusted.pem. This option can be used with <b>\u2212\u2212listen\u2212https=<\/b>. If the path refers to an <b>AF_UNIX<\/b> stream socket in the file system a connection is made to it and the certificate read from it.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>\u2212\u2212gnutls\u2212log=<\/b><\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Takes a comma separated list of gnutls logging categories. This option can be used with <b>\u2212\u2212listen\u2212http=<\/b> or <b>\u2212\u2212listen\u2212https=<\/b>.<\/font><\/p>\n<h2>SINKS <a name=\"SINKS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">The location of the output journal can be specified with <b>\u2212o<\/b> or <b>\u2212\u2212output=<\/b>.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>\u2212\u2212output=<\/b><i>FILE<\/i><\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">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.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>\u2212\u2212output=<\/b><i>DIR<\/i><\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Will create journal files underneath directory <i>DIR<\/i>. 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 <i>DIR<\/i> will be generated using the rules described below.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">If <b>\u2212\u2212output=<\/b> 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\u2212<i>hostname<\/i>.journal, where the <i>hostname<\/i> part is the escaped hostname of the source endpoint of the connection, or the numerical address if the hostname cannot be determined.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">In the case that &#8220;active&#8221; sources are given by the positional arguments or <b>\u2212\u2212getter=<\/b> option, the output file name must always be given explicitly.<\/font><\/p>\n<h2>OPTIONS <a name=\"OPTIONS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">The following options are understood:<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>\u2212\u2212split\u2212mode<\/b><\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">One of <b>none<\/b> or <b>host<\/b>. 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.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">In the case that &#8220;active&#8221; sources are given by the positional arguments or <b>\u2212\u2212getter=<\/b> option, the output file name must always be given explicitly and only <b>none<\/b> is allowed.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>\u2212\u2212compress<\/b> [<i>BOOL<\/i>]<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">If this is set to &#8220;yes&#8221; then compress the data in the journal using XZ. The default is &#8220;yes&#8221;.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>\u2212\u2212seal<\/b> [<i>BOOL<\/i>]<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">If this is set to &#8220;yes&#8221; then periodically sign the data in the journal using Forward Secure Sealing. The default is &#8220;no&#8221;.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>\u2212h<\/b>, <b>\u2212\u2212help<\/b><\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Print a short help text and exit.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>\u2212\u2212version<\/b><\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Print a short version string and exit.<\/font><\/p>\n<h2>EXAMPLES <a name=\"EXAMPLES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">Copy local journal events to a different journal directory:<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">journalctl \u2212o export | systemd\u2212journal\u2212remote \u2212o \/tmp\/dir\/foo.journal \u2212<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">Retrieve all available events from a remote <b>systemd-journal-gatewayd<\/b>(8) instance and store them in \/var\/log\/journal\/remote\/remote\u2212some.host.journal:<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">systemd\u2212journal\u2212remote \u2212\u2212url http:\/\/some.host:19531\/<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">Retrieve current boot events and wait for new events from a remote <b>systemd-journal-gatewayd<\/b>(8) instance, and store them in \/var\/log\/journal\/remote\/remote\u2212some.host.journal:<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">systemd\u2212journal\u2212remote \u2212\u2212url http:\/\/some.host:19531\/entries?boot&#038;follow<\/font><\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>journal-remote.conf<\/b>(5), <b>journalctl<\/b>(1), <b>systemd-journal-gatewayd.service<\/b>(8), <b>systemd-journal-upload.service<\/b>(8), <b>systemd-journald.service<\/b>(8)<\/font><\/p>\n<h2>NOTES <a name=\"NOTES\"><\/a> <\/h2>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"12%\"><\/td>\n<td width=\"3%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">1.<\/font><\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"32%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">Journal Export Format<\/font><\/p>\n<\/td>\n<td width=\"51%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">https:\/\/www.freedesktop.org\/wiki\/Software\/systemd\/export<\/font><\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  systemd-journal-remote.service, systemd-journal-remote.socket, systemd-journal-remote \u2212 Receive journal messages over the network <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[5,52,4,349],"class_list":["post-3208","post","type-post","status-publish","format-standard","hentry","category-8-administracion-del-sistema","tag-5","tag-administracion","tag-man8","tag-systemd-journal-remote"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3208","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=3208"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3208\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=3208"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=3208"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=3208"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}