chiark / gitweb /
man: document systemd-journal-upload
[elogind.git] / man / systemd-journal-remote.xml
index 036d0bcb4a2e0a944dbbc8e0264b6b4e9ffebc1c..410771441805c829650574843c63657d9c4418d3 100644 (file)
@@ -21,7 +21,7 @@ You should have received a copy of the GNU Lesser General Public License
 along with systemd; If not, see <http://www.gnu.org/licenses/>.
 -->
 
-<refentry id="systemd-journal-remote">
+<refentry id="systemd-journal-remote" conditional='HAVE_MICROHTTPD'>
 
   <refentryinfo>
     <title>systemd-journal-remote</title>
@@ -44,14 +44,14 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
 
   <refnamediv>
     <refname>systemd-journal-remote</refname>
-    <refpurpose>Stream journal messages over the network</refpurpose>
+    <refpurpose>Receive journal messages over the network</refpurpose>
   </refnamediv>
 
   <refsynopsisdiv>
     <cmdsynopsis>
       <command>systemd-journal-remote</command>
       <arg choice="opt" rep="repeat">OPTIONS</arg>
-      <arg choice="opt" rep="norepeat">-o/--output=DIR|FILE</arg>
+      <arg choice="opt" rep="norepeat">-o/--output=<replaceable>DIR</replaceable>|<replaceable>FILE</replaceable></arg>
       <arg choice="opt" rep="repeat">SOURCES</arg>
     </cmdsynopsis>
   </refsynopsisdiv>
@@ -79,14 +79,14 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
       (<command>systemd-journal-remote</command> requests and pulls
       the data), or "passive"
       (<command>systemd-journal-remote</command> waits for a
-      connection and than receives events pushed by the other side).
+      connection and then receives events pushed by the other side).
     </para>
 
     <para>
       <command>systemd-journal-remote</command> 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
+      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).
@@ -130,8 +130,8 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
       <varlistentry>
         <term><option>--listen-raw=<replaceable>ADDRESS</replaceable></option></term>
 
-        <listitem><para><option>ADDRESS</option> must be an address
-        suitable for <option>ListenStream=</option> (c.f.
+        <listitem><para><replaceable>ADDRESS</replaceable> must be an
+        address suitable for <option>ListenStream=</option> (cf.
         <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>).
         <command>systemd-journal-remote</command> will listen on this
         socket for connections. Each connection is expected to be a
@@ -139,16 +139,41 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
         </listitem>
       </varlistentry>
 
+      <varlistentry>
+        <term><option>--listen-http=<replaceable>ADDRESS</replaceable></option></term>
+        <term><option>--listen-https=<replaceable>ADDRESS</replaceable></option></term>
+
+        <listitem><para><replaceable>ADDRESS</replaceable> must be
+        either a negative integer, in which case it will be
+        interpreted as the (negated) file descriptor number, or an
+        address suitable for <option>ListenStream=</option> (c.f.
+        <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>).
+        In the first case, matching file descriptor must be inherited
+        through
+        <varname>$LISTEN_FDS</varname>/<varname>$LISTEN_PID</varname>.
+        In the second case, an HTTP or HTTPS server will be spawned on
+        this port, respectively for <option>--listen-http</option> and
+        <option>--listen-https</option>. Currenntly, only POST requests
+        to <filename>/upload</filename> with <literal>Content-Type:
+        application/vnd.fdo.journal</literal> are supported.</para>
+        </listitem>
+      </varlistentry>
+
       <varlistentry>
         <term><varname>$LISTEN_FDS</varname></term>
 
         <listitem><para><command>systemd-journal-remote</command>
         supports the
         <varname>$LISTEN_FDS</varname>/<varname>$LISTEN_PID</varname>
-        protocol. Open sockets inherited through socket
-        activation behave like those opened with
-        <option>--listen-raw=</option> described above.
-        </para>
+        protocol. Open sockets inherited through socket activation
+        behave like those opened with <option>--listen-raw=</option>
+        described above, unless they are specified as an argument in
+        <option>--listen-http=-<replaceable>n</replaceable></option>
+        or
+        <option>--listen-https=-<replaceable>n</replaceable></option>
+        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.</para>
         </listitem>
       </varlistentry>
 
@@ -168,25 +193,25 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
 
         <listitem><para>Will write to this journal. The filename must
         end with <filename>.journal</filename>. The file will be
-        created if it does not exist. When necessary (journal file
-        full, or corrupted) the file will be renamed following normal
-        journald rules and a new journal file will be created in it's
-        stead. </para></listitem>
+        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.</para></listitem>
       </varlistentry>
 
       <varlistentry>
         <term><option>--output=<replaceable>DIR</replaceable></option></term>
 
         <listitem><para>Will create journal files underneath directory
-        <replaceable>DIR</replaceable>. The directory must exist. When
-        necessary (journal files over size, or corrupted) journal
+        <replaceable>DIR</replaceable>. 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 <replaceable>DIR</replaceable> will be
         generated using the rules described below.</para></listitem>
       </varlistentry>
     </variablelist>
 
-    <para>If <option>--output=</option> is not used, output directory
+    <para>If <option>--output=</option> is not used, the output directory
     <filename>/var/log/journal/<replaceable>machine-id</replaceable>/</filename>
     will be used, where <replaceable>machine-id</replaceable> is the
     identifier of the current system (see
@@ -198,7 +223,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
     based on what passive and active sources are specified. It is
     recommended to give a full output filename.</para>
 
-    <para>In case of "active" sources, if the hostname is known it
+    <para>In case of "active" sources, if the hostname is known, it
     will be used in the <replaceable>variable</replaceable> part.
     Otherwise, local address and port number will be used, or
     <literal>stdin</literal> for events passed over standard
@@ -227,6 +252,20 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
         string and exit.</para></listitem>
       </varlistentry>
 
+      <varlistentry>
+        <term><option>--split-mode</option></term>
+
+        <listitem><para>One of <constant>none</constant> or
+        <constant>host</constant>. 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.</para>
+
+        <para>In case of "active" sources, the output file name must
+        always be given explicitly and only <constant>none</constant>
+        is allowed.</para></listitem>
+      </varlistentry>
+
       <varlistentry>
         <term><option>--compress</option></term>
         <term><option>--no-compress</option></term>
@@ -247,7 +286,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
       <varlistentry>
         <term><option>--getter=<replaceable>PROG --option1 --option2</replaceable></option></term>
 
-        <listitem><para>Program to invoke to retrieve data. Journal
+        <listitem><para>Program to invoke to retrieve data. The journal
         event stream must be generated on standard output.</para>
 
         <para>Examples:</para>
@@ -281,9 +320,10 @@ systemd-journal-remote --url http://some.host:19531/
   <refsect1>
     <title>See Also</title>
     <para>
+      <citerefentry><refentrytitle>systemd-journal-upload</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
-      <citerefentry><refentrytitle>systemd-journal-gatewayd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
+      <citerefentry><refentrytitle>systemd-journal-gatewayd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
     </para>
   </refsect1>
 </refentry>