2521N/A<?
xml version='1.0'?>
<!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*--> 2521N/A<!
DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" 2521N/A This file is part of systemd. 2521N/A Copyright 2012 Zbigniew Jędrzejewski-Szmek 2521N/A systemd is free software; you can redistribute it and/or modify it 2521N/A under the terms of the GNU Lesser General Public License as published by 2521N/A the Free Software Foundation; either version 2.1 of the License, or 2521N/A (at your option) any later version. 2521N/A systemd is distributed in the hope that it will be useful, but 2521N/A WITHOUT ANY WARRANTY; without even the implied warranty of 2521N/A MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2521N/A Lesser General Public License for more details. 2521N/A You should have received a copy of the GNU Lesser General Public License 3998N/A <
productname>systemd</
productname>
2521N/A <
contrib>Developer</
contrib>
4194N/A <
firstname>Zbigniew</
firstname>
3817N/A <
surname>Jędrzejewski-Szmek</
surname>
2521N/A <
email>zbyszek@in.waw.pl</
email>
4285N/A <
refname>systemd-journal-gatewayd</
refname>
4667N/A <
refpurpose>HTTP server for journal events</
refpurpose>
2521N/A <
arg choice="opt" rep="repeat">OPTIONS</
arg>
<
para><
command>systemd-journal-gatewayd</
command> serves journal
events over the network. Clients must connect using
HTTP. The server listens on port 19531 by default.
If <
option>--cert=</
option> is specified, the server expects
HTTPS connections.</
para>
<
para>The program is started by
<
citerefentry><
refentrytitle>systemd</
refentrytitle><
manvolnum>1</
manvolnum></
citerefentry>
and expects to receive a single socket. Use
to have it started on boot.</
para>
<
para>The following options are understood:</
para>
<
term><
option>--cert=</
option></
term>
<
listitem><
para>Specify the path to a file containing a server
certificate in PEM format. This option switches
<
command>systemd-journal-gatewayd</
command> into HTTPS mode
and must be used together with
<
option>--key=</
option>.</
para></
listitem>
<
term><
option>--key=</
option></
term>
<
listitem><
para>Specify the path to a file containing a server
key in PEM format corresponding to the certificate specified
with <
option>--cert=</
option>.</
para></
listitem>
<
title>Supported URLs</
title>
<
para>The following URLs are recognized:</
para>
<
term><
uri>/browse</
uri></
term>
<
listitem><
para>Interactive browsing.</
para></
listitem>
<
term><
uri>/entries[?option1&option2=value...]</
uri></
term>
<
listitem><
para>Retrieval of events in various formats.</
para>
<
para>The <
option>Accept:</
option> part of the HTTP header
determines the format. Supported values are described below.
<
para>The <
option>Range:</
option> part of the HTTP header
determines the range of events returned. Supported values are
<
para>GET parameters can be used to modify what events are
returned. Supported parameters are described below.</
para>
<
term><
uri>/machine</
uri></
term>
<
listitem><
para>Return a JSON structure describing the machine.</
para>
<
programlisting>{ "machine_id" : "8cf7ed9d451ea194b77a9f118f3dc446",
"boot_id" : "3d3c9efaf556496a9b04259ee35df7f7",
"os_pretty_name" : "Fedora 19 (Rawhide)",
"virtualization" : "kvm",
<
term><
uri>/fields/<
replaceable>FIELD_NAME</
replaceable></
uri></
term>
<
listitem><
para>Return a list of values of this field present in the logs.</
para>
<
title>Accept header</
title>
<
option>Accept: <
replaceable>format</
replaceable></
option>
<
para>Recognized formats:</
para>
<
listitem><
para>The default. Plaintext syslog-like output,
one line per journal entry
(like <
command>journalctl --output short</
command>).</
para>
<
listitem><
para>Entries are formatted as JSON data structures,
(like <
command>journalctl --output json</
command>).
JSON Format</
ulink> for more information.</
para>
<
listitem><
para>Entries are formatted as JSON data structures,
wrapped in a format suitable for <
ulink Server-Sent Events</
ulink>
(like <
command>journalctl --output json-sse</
command>).
<
listitem><
para>Entries are serialized into a binary (but
mostly text-based) stream suitable for backups and network
(like <
command>journalctl --output export</
command>).
Export Format</
ulink> for more information.</
para>
<
title>Range header</
title>
<
option>Range: entries=<
replaceable>cursor</
replaceable>[[:<
replaceable>num_skip</
replaceable>]:<
replaceable>num_entries</
replaceable>]</
option>
<
option>cursor</
option> is a cursor string,
<
option>num_skip</
option> is an integer,
<
option>num_entries</
option> is an unsigned integer.
<
para>Range defaults to all available events.</
para>
<
title>URL GET parameters</
title>
<
para>Following parameters can be used as part of the URL:</
para>
<
term><
uri>follow</
uri></
term>
<
listitem><
para>wait for new events
(like <
command>journalctl --follow</
command>, except that
the number of events returned is not limited).</
para>
<
term><
uri>discrete</
uri></
term>
<
listitem><
para>Test that the specified cursor refers to an
entry in the journal. Returns just this entry.</
para>
<
term><
uri>boot</
uri></
term>
<
listitem><
para>Limit events to the current boot of the system
(like <
command>journalctl --this--boot</
command>).</
para></
listitem>
<
term><
uri><
replaceable>KEY</
replaceable>=<
replaceable>match</
replaceable></
uri></
term>
<
listitem><
para>Match journal fields. See
<
citerefentry><
refentrytitle>
systemd.journal-fields</
refentrytitle><
manvolnum>7</
manvolnum></
citerefentry>.</
para>
<
para>Retrieve events from this boot from local journal
<
para>Listen for core dumps:
<
citerefentry><
refentrytitle>systemd</
refentrytitle><
manvolnum>1</
manvolnum></
citerefentry>,
<
citerefentry><
refentrytitle>journalctl</
refentrytitle><
manvolnum>1</
manvolnum></
citerefentry>,