]> git.proxmox.com Git - systemd.git/blob - man/systemd-journal-upload.html
Imported Upstream version 221
[systemd.git] / man / systemd-journal-upload.html
1 <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>
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
22 <span style="float:right">systemd 221</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="idm47159419451728"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p>
23 <span class="command"><strong>systemd-journal-upload</strong></span> will upload journal
24 entries to the URL specified with <code class="option">--url</code>. Unless
25 limited by one of the options specified below, all journal
26 entries accessible to the user the program is running as will be
27 uploaded, and then the program will wait and send new entries
28 as they become available.
29 </p></div><div class="refsect1"><a name="idm47159420638752"></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
30 address. <em class="replaceable"><code>URL</code></em> may specify either
31 just the hostname or both the protocol and
32 hostname. <code class="constant">https</code> is the default.
33 </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
34 services and the kernel, or to entries from services of
35 current user. This has the same meaning as
36 <code class="option">--system</code> and <code class="option">--user</code> options
37 for
38 <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>. If
39 neither is specified, all accessible entries are uploaded.
40 </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
41 journals, including other machines. This has the same meaning
42 as <code class="option">--merge</code> option for
43 <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
44 entries from the specified journal directory
45 <em class="replaceable"><code>DIR</code></em> instead of the default runtime
46 and system journal paths. This has the same meaning as
47 <code class="option">--directory</code> option for
48 <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>.
49 </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
50 entries from the specified journal files matching
51 <em class="replaceable"><code>GLOB</code></em> instead of the default runtime
52 and system journal paths. May be specified multiple times, in
53 which case files will be suitably interleaved. This has the same meaning as
54 <code class="option">--file</code> option for
55 <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>.
56 </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
57 journal specified by the passed cursor. This has the same
58 meaning as <code class="option">--cursor</code> option for
59 <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
60 journal <span class="emphasis"><em>after</em></span> the location specified by
61 the this cursor. This has the same meaning as
62 <code class="option">--after-cursor</code> option for
63 <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>.
64 </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
65 journal <span class="emphasis"><em>after</em></span> the location specified by
66 the cursor saved in file at <em class="replaceable"><code>PATH</code></em>
67 (<code class="filename">/var/lib/systemd/journal-upload/state</code> by default).
68 After an entry is successfully uploaded, update this file
69 with the cursor of that entry.
70 </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.
71 </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="idm47159417598096"></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
72 failure code is returned.</p></div><div class="refsect1"><a name="idm47159417596848"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples"></a></h2><div class="example"><a name="idm47159417596208"></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
73 verify that the server to which messages are uploaded is
74 legitimate, and vice versa, that the client is trusted.</p><p>A suitable set of certificates can be generated with
75 <span class="command"><strong>openssl</strong></span>:</p><pre class="programlisting">openssl req -newkey rsa:2048 -days 3650 -x509 -nodes \
76 -out ca.pem -keyout ca.key -subj '/CN=Certificate authority/'
77
78 cat &gt;ca.conf &lt;&lt;EOF
79 [ ca ]
80 default_ca = this
81
82 [ this ]
83 new_certs_dir = .
84 certificate = ca.pem
85 database = ./index
86 private_key = ca.key
87 serial = ./serial
88 default_days = 3650
89 default_md = default
90 policy = policy_anything
91
92 [ policy_anything ]
93 countryName = optional
94 stateOrProvinceName = optional
95 localityName = optional
96 organizationName = optional
97 organizationalUnitName = optional
98 commonName = supplied
99 emailAddress = optional
100 EOF
101
102 touch index
103 echo 0001 &gt; serial
104
105 SERVER=server
106 CLIENT=client
107
108 openssl req -newkey rsa:1024 -nodes -out $SERVER.csr -keyout $SERVER.key -subj "/CN=$SERVER/"
109 openssl ca -batch -config ca.conf -notext -in $SERVER.csr -out $SERVER.pem
110
111 openssl req -newkey rsa:1024 -nodes -out $CLIENT.csr -keyout $CLIENT.key -subj "/CN=$CLIENT/"
112 openssl ca -batch -config ca.conf -notext -in $CLIENT.csr -out $CLIENT.pem
113 </pre><p>Generated files <code class="filename">ca.pem</code>,
114 <code class="filename">server.pem</code>, and
115 <code class="filename">server.key</code> should be installed on server,
116 and <code class="filename">ca.pem</code>,
117 <code class="filename">client.pem</code>, and
118 <code class="filename">client.key</code> on the client. The location of
119 those files can be specified using
120 <code class="varname">TrustedCertificateFile=</code>,
121 <code class="varname">ServerCertificateFile=</code>,
122 <code class="varname">ServerKeyFile=</code>, in
123 <code class="filename">/etc/systemd/journal-remote.conf</code> and
124 <code class="filename">/etc/systemd/journal-upload.conf</code>
125 respectively. The default locations can be queried by using
126 <span class="command"><strong>systemd-journal-remote --help</strong></span> and
127 <span class="command"><strong>systemd-journal-upload --help</strong></span>.</p></div></div><br class="example-break"></div><div class="refsect1"><a name="idm47159417583952"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
128 <a href="systemd-journal-remote.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-remote</span>(8)</span></a>,
129 <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>,
130 <a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a>,
131 <a href="systemd-journal-gatewayd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-gatewayd.service</span>(8)</span></a>
132 </p></div></div></body></html>