]> git.proxmox.com Git - systemd.git/blame - man/systemd-journal-gatewayd.html
Imported Upstream version 214
[systemd.git] / man / systemd-journal-gatewayd.html
CommitLineData
663996b3
MS
1<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>systemd-journal-gatewayd.service</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>·
60f067b4 22 <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 214</span><hr><div class="refentry"><a name="systemd-journal-gatewayd.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-journal-gatewayd.service, systemd-journal-gatewayd.socket, systemd-journal-gatewayd — HTTP server for journal events</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-journal-gatewayd.service</code></p><p><code class="filename">systemd-journal-gatewayd.socket</code></p><div class="cmdsynopsis"><p><code class="command">/usr/lib/systemd/systemd-journal-gatewayd</code> [OPTIONS...]</p></div></div><div class="refsect1"><a name="idm214193892400"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-journal-gatewayd</strong></span> serves journal
663996b3
MS
23 events over the network. Clients must connect using
24 HTTP. The server listens on port 19531 by default.
25 If <code class="option">--cert=</code> is specified, the server expects
26 HTTPS connections.</p><p>The program is started by
27 <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
28 and expects to receive a single socket. Use
29 <span class="command"><strong>systemctl start systemd-journal-gatewayd.socket</strong></span> to start
30 the service, and <span class="command"><strong>systemctl enable systemd-journal-gatewayd.socket</strong></span>
60f067b4 31 to have it started on boot.</p></div><div class="refsect1"><a name="idm214192520976"></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="--cert="><span class="term"><code class="option">--cert=</code></span><a class="headerlink" title="Permalink to this term" href="#--cert=">¶</a></dt><dd><p>Specify the path to a file containing a server
663996b3
MS
32 certificate in PEM format. This option switches
33 <span class="command"><strong>systemd-journal-gatewayd</strong></span> into HTTPS mode
34 and must be used together with
35 <code class="option">--key=</code>.</p></dd><dt id="--key="><span class="term"><code class="option">--key=</code></span><a class="headerlink" title="Permalink to this term" href="#--key=">¶</a></dt><dd><p>Specify the path to a file containing a server
36 key in PEM format corresponding to the certificate specified
60f067b4
JS
37 with <code class="option">--cert=</code>.</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.
38 </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="idm214196162016"></a><h2 id="Supported URLs">Supported URLs<a class="headerlink" title="Permalink to this headline" href="#Supported%20URLs">¶</a></h2><p>The following URLs are recognized:</p><div class="variablelist"><dl class="variablelist"><dt id="/browse"><span class="term"><code class="uri">/browse</code></span><a class="headerlink" title="Permalink to this term" href="#/browse">¶</a></dt><dd><p>Interactive browsing.</p></dd><dt id="/entries[?option1&amp;option2=value...]"><span class="term"><code class="uri">/entries[?option1&amp;option2=value...]</code></span><a class="headerlink" title="Permalink to this term" href="#/entries%5B?option1&amp;option2=value...%5D">¶</a></dt><dd><p>Retrieval of events in various formats.</p><p>The <code class="option">Accept:</code> part of the HTTP header
663996b3
MS
39 determines the format. Supported values are described below.
40 </p><p>The <code class="option">Range:</code> part of the HTTP header
41 determines the range of events returned. Supported values are
42 described below.
43 </p><p>GET parameters can be used to modify what events are
44 returned. Supported parameters are described below.</p></dd><dt id="/machine"><span class="term"><code class="uri">/machine</code></span><a class="headerlink" title="Permalink to this term" href="#/machine">¶</a></dt><dd><p>Return a JSON structure describing the machine.</p><p>Example:
60f067b4 45 </p><pre class="programlisting">{ "machine_id" : "8cf7ed9d451ea194b77a9f118f3dc446",
663996b3
MS
46 "boot_id" : "3d3c9efaf556496a9b04259ee35df7f7",
47 "hostname" : "fedora",
48 "os_pretty_name" : "Fedora 19 (Rawhide)",
49 "virtualization" : "kvm",
60f067b4
JS
50 ...}</pre><p>
51 </p></dd><dt id="/fields/FIELD_NAME"><span class="term"><code class="uri">/fields/<em class="replaceable"><code>FIELD_NAME</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#/fields/FIELD_NAME">¶</a></dt><dd><p>Return a list of values of this field present in the logs.</p></dd></dl></div></div><div class="refsect1"><a name="idm214192369200"></a><h2 id="Accept header">Accept header<a class="headerlink" title="Permalink to this headline" href="#Accept%20header">¶</a></h2><p>
663996b3
MS
52 <code class="option">Accept: <em class="replaceable"><code>format</code></em></code>
53 </p><p>Recognized formats:</p><div class="variablelist"><dl class="variablelist"><dt id="text/plain"><span class="term"><code class="constant">text/plain</code></span><a class="headerlink" title="Permalink to this term" href="#text/plain">¶</a></dt><dd><p>The default. Plaintext syslog-like output,
54 one line per journal entry
55 (like <span class="command"><strong>journalctl --output short</strong></span>).</p></dd><dt id="application/json"><span class="term"><code class="constant">application/json</code></span><a class="headerlink" title="Permalink to this term" href="#application/json">¶</a></dt><dd><p>Entries are formatted as JSON data structures,
56 one per line
57 (like <span class="command"><strong>journalctl --output json</strong></span>).
58 See <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/json" target="_top">Journal
59 JSON Format</a> for more information.</p></dd><dt id="application/event-stream"><span class="term"><code class="constant">application/event-stream</code></span><a class="headerlink" title="Permalink to this term" href="#application/event-stream">¶</a></dt><dd><p>Entries are formatted as JSON data structures,
60 wrapped in a format suitable for <a class="ulink" href="https://developer.mozilla.org/en-US/docs/Server-sent_events/Using_server-sent_events" target="_top">
61 Server-Sent Events</a>
62 (like <span class="command"><strong>journalctl --output json-sse</strong></span>).
63 </p></dd><dt id="application/vnd.fdo.journal"><span class="term"><code class="constant">application/vnd.fdo.journal</code></span><a class="headerlink" title="Permalink to this term" href="#application/vnd.fdo.journal">¶</a></dt><dd><p>Entries are serialized into a binary (but
64 mostly text-based) stream suitable for backups and network
65 transfer
66 (like <span class="command"><strong>journalctl --output export</strong></span>).
67 See <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/export" target="_top">Journal
60f067b4 68 Export Format</a> for more information.</p></dd></dl></div></div><div class="refsect1"><a name="idm214196251840"></a><h2 id="Range header">Range header<a class="headerlink" title="Permalink to this headline" href="#Range%20header">¶</a></h2><p>
663996b3
MS
69 <code class="option">Range: entries=<em class="replaceable"><code>cursor</code></em>[[:<em class="replaceable"><code>num_skip</code></em>]:<em class="replaceable"><code>num_entries</code></em>]</code>
70 </p><p>where
71 <code class="option">cursor</code> is a cursor string,
72 <code class="option">num_skip</code> is an integer,
73 <code class="option">num_entries</code> is an unsigned integer.
60f067b4 74 </p><p>Range defaults to all available events.</p></div><div class="refsect1"><a name="idm214196246672"></a><h2 id="URL GET parameters">URL GET parameters<a class="headerlink" title="Permalink to this headline" href="#URL%20GET%20parameters">¶</a></h2><p>Following parameters can be used as part of the URL:</p><div class="variablelist"><dl class="variablelist"><dt id="follow"><span class="term"><code class="uri">follow</code></span><a class="headerlink" title="Permalink to this term" href="#follow">¶</a></dt><dd><p>wait for new events
663996b3
MS
75 (like <span class="command"><strong>journalctl --follow</strong></span>, except that
76 the number of events returned is not limited).</p></dd><dt id="discrete"><span class="term"><code class="uri">discrete</code></span><a class="headerlink" title="Permalink to this term" href="#discrete">¶</a></dt><dd><p>Test that the specified cursor refers to an
77 entry in the journal. Returns just this entry.</p></dd><dt id="boot"><span class="term"><code class="uri">boot</code></span><a class="headerlink" title="Permalink to this term" href="#boot">¶</a></dt><dd><p>Limit events to the current boot of the system
78 (like <span class="command"><strong>journalctl --this--boot</strong></span>).</p></dd><dt id="KEY=match"><span class="term"><code class="uri"><em class="replaceable"><code>KEY</code></em>=<em class="replaceable"><code>match</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#KEY=match">¶</a></dt><dd><p>Match journal fields. See
60f067b4 79 <a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a>.</p></dd></dl></div></div><div class="refsect1"><a name="idm214196228816"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>Retrieve events from this boot from local journal
663996b3
MS
80 in <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/export" target="_top">Journal
81 Export Format</a>:
60f067b4
JS
82 </p><pre class="programlisting">curl --silent -H'Accept: application/vnd.fdo.journal' \
83 'http://localhost:19531/entries?boot'</pre><p>
663996b3 84 </p><p>Listen for core dumps:
60f067b4 85 </p><pre class="programlisting">curl 'http://localhost:19531/entries?follow&amp;MESSAGE_ID=fc2e22bc6ee647b6b90729ab34a250b1'</pre></div><div class="refsect1"><a name="idm214196225088"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
663996b3
MS
86 <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
87 <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>,
88 <a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a>,
89 <a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a>,
90 </p></div></div></body></html>