]> git.proxmox.com Git - systemd.git/blob - man/systemd-journal-gatewayd.service.html
935d6dcc29f023efffc255d22fb456017e532f28
[systemd.git] / man / systemd-journal-gatewayd.service.html
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>·
22 <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 208</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="idm274688018288"></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
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>
31 to have it started on boot.</p></div><div class="refsect1"><a name="idm274688013280"></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="--help"><span class="term"><code class="option">--help</code>, </span><span class="term"><code class="option">-h</code></span><a class="headerlink" title="Permalink to this term" href="#--help"></a></dt><dd><p>Prints a short help
32 text and exits.</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>Prints a short version
33 string and exits.</p></dd><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
34 certificate in PEM format. This option switches
35 <span class="command"><strong>systemd-journal-gatewayd</strong></span> into HTTPS mode
36 and must be used together with
37 <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
38 key in PEM format corresponding to the certificate specified
39 with <code class="option">--cert=</code>.</p></dd></dl></div></div><div class="refsect1"><a name="idm274691962480"></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
40 determines the format. Supported values are described below.
41 </p><p>The <code class="option">Range:</code> part of the HTTP header
42 determines the range of events returned. Supported values are
43 described below.
44 </p><p>GET parameters can be used to modify what events are
45 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:
46 </p><pre class="programlisting">
47 { "machine_id" : "8cf7ed9d451ea194b77a9f118f3dc446",
48 "boot_id" : "3d3c9efaf556496a9b04259ee35df7f7",
49 "hostname" : "fedora",
50 "os_pretty_name" : "Fedora 19 (Rawhide)",
51 "virtualization" : "kvm",
52 ...}
53 </pre><p>
54 </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="idm274691950592"></a><h2 id="Accept header">Accept header<a class="headerlink" title="Permalink to this headline" href="#Accept%20header"></a></h2><p>
55 <code class="option">Accept: <em class="replaceable"><code>format</code></em></code>
56 </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,
57 one line per journal entry
58 (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,
59 one per line
60 (like <span class="command"><strong>journalctl --output json</strong></span>).
61 See <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/json" target="_top">Journal
62 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,
63 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">
64 Server-Sent Events</a>
65 (like <span class="command"><strong>journalctl --output json-sse</strong></span>).
66 </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
67 mostly text-based) stream suitable for backups and network
68 transfer
69 (like <span class="command"><strong>journalctl --output export</strong></span>).
70 See <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/export" target="_top">Journal
71 Export Format</a> for more information.</p></dd></dl></div></div><div class="refsect1"><a name="idm274691929104"></a><h2 id="Range header">Range header<a class="headerlink" title="Permalink to this headline" href="#Range%20header"></a></h2><p>
72 <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>
73 </p><p>where
74 <code class="option">cursor</code> is a cursor string,
75 <code class="option">num_skip</code> is an integer,
76 <code class="option">num_entries</code> is an unsigned integer.
77 </p><p>Range defaults to all available events.</p></div><div class="refsect1"><a name="idm274691923936"></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
78 (like <span class="command"><strong>journalctl --follow</strong></span>, except that
79 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
80 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
81 (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
82 <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="idm274686947232"></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
83 in <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/export" target="_top">Journal
84 Export Format</a>:
85 </p><pre class="programlisting">
86 curl --silent -H'Accept: application/vnd.fdo.journal' \
87 'http://localhost:19531/entries?boot'
88 </pre><p>
89 </p><p>Listen for core dumps:
90 </p><pre class="programlisting">
91 curl 'http://localhost:19531/entries?follow&amp;MESSAGE_ID=fc2e22bc6ee647b6b90729ab34a250b1'
92 </pre></div><div class="refsect1"><a name="idm274686943520"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
93 <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
94 <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>,
95 <a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a>,
96 <a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a>,
97 </p></div></div></body></html>