]> git.proxmox.com Git - systemd.git/blob - man/systemd-journal-remote.html
Imported Upstream version 217
[systemd.git] / man / systemd-journal-remote.html
1 <html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>systemd-journal-remote</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
2 a.headerlink {
3 color: #c60f0f;
4 font-size: 0.8em;
5 padding: 0 4px 0 4px;
6 text-decoration: none;
7 visibility: hidden;
8 }
9
10 a.headerlink:hover {
11 background-color: #c60f0f;
12 color: white;
13 }
14
15 h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
16 visibility: visible;
17 }
18 </style><a href="index.html">Index </a>·
19 <a href="systemd.directives.html">Directives </a>·
20 <a href="../python-systemd/index.html">Python </a>·
21 <a href="../libudev/index.html">libudev </a>·
22 <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-journal-remote"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-journal-remote — Receive journal messages over the network</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-journal-remote</code> [OPTIONS...] [-o/--output=<em class="replaceable"><code>DIR</code></em>|<em class="replaceable"><code>FILE</code></em>] [SOURCES...]</p></div></div><div class="refsect1"><a name="idm214172089888"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p>
23 <code class="filename">systemd-journal-remote</code> is a command to
24 receive serialized journal events and store them to the journal.
25 Input streams are in the
26 <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/export" target="_top">
27 Journal Export Format
28 </a>,
29 i.e. like the output from
30 <span class="command"><strong>journalctl --output=export</strong></span>. For transport over
31 the network, this serialized stream is usually carried over an
32 HTTPS connection.
33 </p></div><div class="refsect1"><a name="idm214172086368"></a><h2 id="Sources">Sources<a class="headerlink" title="Permalink to this headline" href="#Sources"></a></h2><p>
34 Sources can be either "active"
35 (<span class="command"><strong>systemd-journal-remote</strong></span> requests and pulls
36 the data), or "passive"
37 (<span class="command"><strong>systemd-journal-remote</strong></span> waits for a
38 connection and then receives events pushed by the other side).
39 </p><p>
40 <span class="command"><strong>systemd-journal-remote</strong></span> can read more than one
41 event stream at a time. They will be interleaved in the output
42 file. In case of "active" connections, each "source" is one
43 stream, and in case of "passive" connections, each connection can
44 result in a separate stream. Sockets can be configured in
45 "accept" mode (i.e. only one connection), or "listen" mode (i.e.
46 multiple connections, each resulting in a stream).
47 </p><p>
48 When there are no more connections, and no more can be created
49 (there are no listening sockets), then
50 <span class="command"><strong>systemd-journal-remote</strong></span> will exit.
51 </p><p>Active sources can be specified in the following
52 ways:</p><div class="variablelist"><dl class="variablelist"><dt id=""><a class="headerlink" title="Permalink to this term" href="#"></a></dt><dd><p>When <code class="option">-</code> is given as a
53 positional argument, events will be read from standard input.
54 Other positional arguments will be treated as filenames
55 to open and read from.</p></dd><dt id="--url=ADDRESS"><span class="term"><code class="option">--url=<em class="replaceable"><code>ADDRESS</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#--url=ADDRESS"></a></dt><dd><p>With the
56 <code class="option">--url=<em class="replaceable"><code>ADDRESS</code></em></code> option,
57 events will be retrieved using HTTP from
58 <em class="replaceable"><code>ADDRESS</code></em>. This URL should refer to the
59 root of a remote
60 <a href="systemd-journal-gatewayd.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-gatewayd</span>(8)</span></a>
61 instance (e.g. <a class="ulink" href="" target="_top">http://some.host:19531/</a> or
62 <a class="ulink" href="" target="_top">https://some.host:19531/</a>).</p></dd></dl></div><p>Passive sources can be specified in the following
63 ways:</p><div class="variablelist"><dl class="variablelist"><dt id="--listen-raw=ADDRESS"><span class="term"><code class="option">--listen-raw=<em class="replaceable"><code>ADDRESS</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#--listen-raw=ADDRESS"></a></dt><dd><p><em class="replaceable"><code>ADDRESS</code></em> must be an
64 address suitable for <code class="option">ListenStream=</code> (cf.
65 <a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a>).
66 <span class="command"><strong>systemd-journal-remote</strong></span> will listen on this
67 socket for connections. Each connection is expected to be a
68 stream of journal events.</p></dd><dt id="--listen-http=ADDRESS"><span class="term"><code class="option">--listen-http=<em class="replaceable"><code>ADDRESS</code></em></code>, </span><span class="term"><code class="option">--listen-https=<em class="replaceable"><code>ADDRESS</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#--listen-http=ADDRESS"></a></dt><dd><p><em class="replaceable"><code>ADDRESS</code></em> must be
69 either a negative integer, in which case it will be
70 interpreted as the (negated) file descriptor number, or an
71 address suitable for <code class="option">ListenStream=</code> (c.f.
72 <a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a>).
73 In the first case, matching file descriptor must be inherited
74 through
75 <code class="varname">$LISTEN_FDS</code>/<code class="varname">$LISTEN_PID</code>.
76 In the second case, an HTTP or HTTPS server will be spawned on
77 this port, respectively for <code class="option">--listen-http</code> and
78 <code class="option">--listen-https</code>. Currenntly, only POST requests
79 to <code class="filename">/upload</code> with "<code class="literal">Content-Type:
80 application/vnd.fdo.journal</code>" are supported.</p></dd><dt id="$LISTEN_FDS"><span class="term"><code class="varname">$LISTEN_FDS</code></span><a class="headerlink" title="Permalink to this term" href="#%24LISTEN_FDS"></a></dt><dd><p><span class="command"><strong>systemd-journal-remote</strong></span>
81 supports the
82 <code class="varname">$LISTEN_FDS</code>/<code class="varname">$LISTEN_PID</code>
83 protocol. Open sockets inherited through socket activation
84 behave like those opened with <code class="option">--listen-raw=</code>
85 described above, unless they are specified as an argument in
86 <code class="option">--listen-http=-<em class="replaceable"><code>n</code></em></code>
87 or
88 <code class="option">--listen-https=-<em class="replaceable"><code>n</code></em></code>
89 above. In the latter case, an HTTP or HTTPS server will be
90 spawned using this descriptor and connections must be made
91 over the HTTP protocol.</p></dd></dl></div></div><div class="refsect1"><a name="idm214176005424"></a><h2 id="Sinks">Sinks<a class="headerlink" title="Permalink to this headline" href="#Sinks"></a></h2><p>The location of the output journal can be specified
92 with <code class="option">-o</code> or <code class="option">--output=</code>. For "active"
93 sources, this option is required.
94 </p><div class="variablelist"><dl class="variablelist"><dt id="--output=FILE"><span class="term"><code class="option">--output=<em class="replaceable"><code>FILE</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#--output=FILE"></a></dt><dd><p>Will write to this journal file. The filename
95 must end with <code class="filename">.journal</code>. The file will be
96 created if it does not exist. If necessary (journal file full,
97 or corrupted), the file will be renamed following normal
98 journald rules and a new journal file will be created in its
99 stead.</p></dd><dt id="--output=DIR"><span class="term"><code class="option">--output=<em class="replaceable"><code>DIR</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#--output=DIR"></a></dt><dd><p>Will create journal files underneath directory
100 <em class="replaceable"><code>DIR</code></em>. The directory must exist. If
101 necessary (journal files over size, or corrupted), journal
102 files will be rotated following normal journald rules. Names
103 of files underneath <em class="replaceable"><code>DIR</code></em> will be
104 generated using the rules described below.</p></dd></dl></div><p>If <code class="option">--output=</code> is not used, the output
105 directory <code class="filename">/var/log/journal/remote/</code> will be
106 used. In case the output file is not specified, journal files
107 will be created underneath the selected directory. Files will be
108 called
109 <code class="filename">remote-<em class="replaceable"><code>hostname</code></em>.journal</code>,
110 where the <em class="replaceable"><code>hostname</code></em> part is the
111 escaped hostname of the source endpoint of the connection, or the
112 numerical address if the hostname cannot be determined.</p><p>In case of "active" sources, the output file name must
113 always be given explicitly.</p></div><div class="refsect1"><a name="idm214175993824"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options"></a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--split-mode"><span class="term"><code class="option">--split-mode</code></span><a class="headerlink" title="Permalink to this term" href="#--split-mode"></a></dt><dd><p>One of <code class="constant">none</code> or
114 <code class="constant">host</code>. For the first, only one output
115 journal file is used. For the latter, a separate output file
116 is used, based on the hostname of the other endpoint of a
117 connection.</p><p>In case of "active" sources, the output file name must
118 always be given explicitly and only <code class="constant">none</code>
119 is allowed.</p></dd><dt id="--compress"><span class="term"><code class="option">--compress</code>, </span><span class="term"><code class="option">--no-compress</code></span><a class="headerlink" title="Permalink to this term" href="#--compress"></a></dt><dd><p>Compress or not, respectively, the data in the
120 journal using XZ.</p></dd><dt id="--seal"><span class="term"><code class="option">--seal</code>, </span><span class="term"><code class="option">--no-seal</code></span><a class="headerlink" title="Permalink to this term" href="#--seal"></a></dt><dd><p>Periodically sign or not, respectively, the
121 data in the journal using Forward Secure Sealing.
122 </p></dd><dt id="--getter=PROG --option1 --option2"><span class="term"><code class="option">--getter=<em class="replaceable"><code>PROG --option1 --option2</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#--getter=PROG%20--option1%20--option2"></a></dt><dd><p>Program to invoke to retrieve data. The journal
123 event stream must be generated on standard output.</p><p>Examples:</p><pre class="programlisting">--getter='curl "-HAccept: application/vnd.fdo.journal" https://some.host:19531/'</pre><pre class="programlisting">--getter='wget --header="Accept: application/vnd.fdo.journal" -O- https://some.host:19531/'</pre></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h"></a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
124 </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version"></a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm214171013136"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples"></a></h2><p>Copy local journal events to a different journal directory:
125 </p><pre class="programlisting">
126 journalctl -o export | systemd-journal-remote -o /tmp/dir -
127 </pre><p>
128 </p><p>Retrieve events from a remote
129 <a href="systemd-journal-gatewayd.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-gatewayd</span>(8)</span></a>
130 instance and store them in
131 <code class="filename">/var/log/journal/some.host/remote-some~host.journal</code>:
132 </p><pre class="programlisting">
133 systemd-journal-remote --url http://some.host:19531/
134 </pre><p>
135 </p></div><div class="refsect1"><a name="idm214171008960"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
136 <a href="systemd-journal-upload.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-upload</span>(8)</span></a>,
137 <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>,
138 <a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a>,
139 <a href="systemd-journal-gatewayd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-gatewayd.service</span>(8)</span></a>
140 </p></div></div></body></html>