mirror of
https://git.proxmox.com/git/systemd
synced 2025-05-30 03:06:13 +00:00
133 lines
11 KiB
HTML
133 lines
11 KiB
HTML
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>systemd-journal-upload</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
|
||
a.headerlink {
|
||
color: #c60f0f;
|
||
font-size: 0.8em;
|
||
padding: 0 4px 0 4px;
|
||
text-decoration: none;
|
||
visibility: hidden;
|
||
}
|
||
|
||
a.headerlink:hover {
|
||
background-color: #c60f0f;
|
||
color: white;
|
||
}
|
||
|
||
h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
|
||
visibility: visible;
|
||
}
|
||
</style><a href="index.html">Index </a>·
|
||
<a href="systemd.directives.html">Directives </a>·
|
||
<a href="../python-systemd/index.html">Python </a>·
|
||
<a href="../libudev/index.html">libudev </a>·
|
||
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 219</span><hr><div class="refentry"><a name="systemd-journal-upload"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-journal-upload — Send journal messages over the network</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-journal-upload</code> [OPTIONS...] [-u/--url=<em class="replaceable"><code>URL</code></em>] [SOURCES...]</p></div></div><div class="refsect1"><a name="idm140568533958144"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>
|
||
<span class="command"><strong>systemd-journal-upload</strong></span> will upload journal
|
||
entries to the URL specified with <code class="option">--url</code>. 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.
|
||
</p></div><div class="refsect1"><a name="idm140568533955584"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="-u"><span class="term"><code class="option">-u</code>, </span><span class="term"><code class="option">--url=[<span class="optional">https://</span>]<em class="replaceable"><code>URL</code></em></code>, </span><span class="term"><code class="option">--url=[<span class="optional">http://</span>]<em class="replaceable"><code>URL</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#-u">¶</a></dt><dd><p>Upload to the specified
|
||
address. <em class="replaceable"><code>URL</code></em> may specify either
|
||
just the hostname or both the protocol and
|
||
hostname. <code class="constant">https</code> is the default.
|
||
</p></dd><dt id="--system"><span class="term"><code class="option">--system</code>, </span><span class="term"><code class="option">--user</code></span><a class="headerlink" title="Permalink to this term" href="#--system">¶</a></dt><dd><p>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
|
||
<code class="option">--system</code> and <code class="option">--user</code> options
|
||
for
|
||
<a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>. If
|
||
neither is specified, all accessible entries are uploaded.
|
||
</p></dd><dt id="-m"><span class="term"><code class="option">-m</code>, </span><span class="term"><code class="option">--merge</code></span><a class="headerlink" title="Permalink to this term" href="#-m">¶</a></dt><dd><p>Upload entries interleaved from all available
|
||
journals, including other machines. This has the same meaning
|
||
as <code class="option">--merge</code> option for
|
||
<a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>.</p></dd><dt id="-D"><span class="term"><code class="option">-D</code>, </span><span class="term"><code class="option">--directory=<em class="replaceable"><code>DIR</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#-D">¶</a></dt><dd><p>Takes a directory path as argument. Upload
|
||
entries from the specified journal directory
|
||
<em class="replaceable"><code>DIR</code></em> instead of the default runtime
|
||
and system journal paths. This has the same meaning as
|
||
<code class="option">--directory</code> option for
|
||
<a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>.
|
||
</p></dd><dt id="--file=GLOB"><span class="term"><code class="option">--file=<em class="replaceable"><code>GLOB</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#--file=GLOB">¶</a></dt><dd><p>Takes a file glob as an argument. Upload
|
||
entries from the specified journal files matching
|
||
<em class="replaceable"><code>GLOB</code></em> 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
|
||
<code class="option">--file</code> option for
|
||
<a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>.
|
||
</p></dd><dt id="--cursor="><span class="term"><code class="option">--cursor=</code></span><a class="headerlink" title="Permalink to this term" href="#--cursor=">¶</a></dt><dd><p>Upload entries from the location in the
|
||
journal specified by the passed cursor. This has the same
|
||
meaning as <code class="option">--cursor</code> option for
|
||
<a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>.</p></dd><dt id="--after-cursor="><span class="term"><code class="option">--after-cursor=</code></span><a class="headerlink" title="Permalink to this term" href="#--after-cursor=">¶</a></dt><dd><p>Upload entries from the location in the
|
||
journal <span class="emphasis"><em>after</em></span> the location specified by
|
||
the this cursor. This has the same meaning as
|
||
<code class="option">--after-cursor</code> option for
|
||
<a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>.
|
||
</p></dd><dt id="--save-state=PATH"><span class="term"><code class="option">--save-state</code>[<span class="optional">=<em class="replaceable"><code>PATH</code></em></span>]</span><a class="headerlink" title="Permalink to this term" href="#--save-state=PATH">¶</a></dt><dd><p>Upload entries from the location in the
|
||
journal <span class="emphasis"><em>after</em></span> the location specified by
|
||
the cursor saved in file at <em class="replaceable"><code>PATH</code></em>
|
||
(<code class="filename">/var/lib/systemd/journal-upload/state</code> by default).
|
||
After an entry is successfully uploaded, update this file
|
||
with the cursor of that entry.
|
||
</p></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.
|
||
</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="idm140568537869952"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned; otherwise, a non-zero
|
||
failure code is returned.</p></div><div class="refsect1"><a name="idm140568537868768"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><div class="example"><a name="idm140568537868096"></a><p class="title"><b>Example 1. Setting up certificates for authentication</b></p><div class="example-contents"><p>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.</p><p>A suitable set of certificates can be generated with
|
||
<span class="command"><strong>openssl</strong></span>:</p><pre class="programlisting">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
|
||
</pre><p>Generated files <code class="filename">ca.pem</code>,
|
||
<code class="filename">server.pem</code>, and
|
||
<code class="filename">server.key</code> should be installed on server,
|
||
and <code class="filename">ca.pem</code>,
|
||
<code class="filename">client.pem</code>, and
|
||
<code class="filename">client.key</code> on the client. The location of
|
||
those files can be specified using
|
||
<code class="varname">TrustedCertificateFile=</code>,
|
||
<code class="varname">ServerCertificateFile=</code>,
|
||
<code class="varname">ServerKeyFile=</code>, in
|
||
<code class="filename">/etc/systemd/journal-remote.conf</code> and
|
||
<code class="filename">/etc/systemd/journal-upload.conf</code>
|
||
respectively. The default locations can be queried by using
|
||
<span class="command"><strong>systemd-journal-remote --help</strong></span> and
|
||
<span class="command"><strong>systemd-journal-upload --help</strong></span>.</p></div></div><br class="example-break"></div><div class="refsect1"><a name="idm140568537854768"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
|
||
<a href="systemd-journal-remote.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-remote</span>(8)</span></a>,
|
||
<a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>,
|
||
<a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a>,
|
||
<a href="systemd-journal-gatewayd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-gatewayd.service</span>(8)</span></a>
|
||
</p></div></div></body></html>
|