{"id":3218,"date":"2022-12-20T16:43:51","date_gmt":"2022-12-20T19:43:51","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/systemdjournalgatewayd-service-man8\/"},"modified":"2022-12-20T16:43:51","modified_gmt":"2022-12-20T19:43:51","slug":"systemdjournalgatewayd-service-man8","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/systemdjournalgatewayd-service-man8\/","title":{"rendered":"SYSTEMD&minus;JOURNAL&minus;GATEWAYD.SERVICE (man8)"},"content":{"rendered":"<h1 align=\"center\">SYSTEMD\u2212JOURNAL\u2212GATEWAYD.SERVICE<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#OPTIONS\">OPTIONS<\/a><br \/> <a href=\"#SUPPORTED URLS\">SUPPORTED URLS<\/a><br \/> <a href=\"#ACCEPT HEADER\">ACCEPT HEADER<\/a><br \/> <a href=\"#RANGE HEADER\">RANGE HEADER<\/a><br \/> <a href=\"#URL GET PARAMETERS\">URL GET PARAMETERS<\/a><br \/> <a href=\"#EXAMPLES\">EXAMPLES<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a><br \/> <a href=\"#NOTES\">NOTES<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">systemd-journal-gatewayd.service, systemd-journal-gatewayd.socket, systemd-journal-gatewayd \u2212 HTTP server for journal events<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">systemd\u2212journal\u2212gatewayd.service<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">systemd\u2212journal\u2212gatewayd.socket<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"83%\">\n<p style=\"margin-top: 1em\"><b>\/usr\/lib\/systemd\/systemd\u2212journal\u2212gatewayd<\/b> [OPTIONS&#8230;]<\/p>\n<\/td>\n<td width=\"6%\"> <\/td>\n<\/tr>\n<\/table>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>systemd\u2212journal\u2212gatewayd<\/b> serves journal events over the network. Clients must connect using HTTP. The server listens on port 19531 by default. If <b>\u2212\u2212cert=<\/b> is specified, the server expects HTTPS connections.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The program is started by <b>systemd<\/b>(1) and expects to receive a single socket. Use <b>systemctl start systemd\u2212journal\u2212gatewayd.socket<\/b> to start the service, and <b>systemctl enable systemd\u2212journal\u2212gatewayd.socket<\/b> to have it started on boot.<\/p>\n<h2>OPTIONS <a name=\"OPTIONS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The following options are understood:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>\u2212\u2212cert=<\/b><\/p>\n<p style=\"margin-left:17%;\">Specify the path to a file or <b>AF_UNIX<\/b> stream socket to read the server certificate from. The certificate must be in PEM format. This option switches <b>systemd\u2212journal\u2212gatewayd<\/b> into HTTPS mode and must be used together with <b>\u2212\u2212key=<\/b>.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>\u2212\u2212key=<\/b><\/p>\n<p style=\"margin-left:17%;\">Specify the path to a file or <b>AF_UNIX<\/b> stream socket to read the server key corresponding to the certificate specified with <b>\u2212\u2212cert=<\/b> from. The key must be in PEM format.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>\u2212\u2212trust=<\/b><\/p>\n<p style=\"margin-left:17%;\">Specify the path to a file or <b>AF_UNIX<\/b> stream socket to read a CA certificate from. The certificate must be in PEM format.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>\u2212D<\/b> <i>DIR<\/i>, <b>\u2212\u2212directory=<\/b><i>DIR<\/i><\/p>\n<p style=\"margin-left:17%;\">Takes a directory path as argument. If specified, <b>systemd\u2212journal\u2212gatewayd<\/b> will serve the specified journal directory <i>DIR<\/i> instead of the default runtime and system journal paths.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>\u2212h<\/b>, <b>\u2212\u2212help<\/b><\/p>\n<p style=\"margin-left:17%;\">Print a short help text and exit.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>\u2212\u2212version<\/b><\/p>\n<p style=\"margin-left:17%;\">Print a short version string and exit.<\/p>\n<h2>SUPPORTED URLS <a name=\"SUPPORTED URLS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The following URLs are recognized:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">\/browse<\/p>\n<p style=\"margin-left:17%;\">Interactive browsing.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">\/entries[?option1&#038;option2=value&#8230;]<\/p>\n<p style=\"margin-left:17%;\">Retrieval of events in various formats.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">The <b>Accept:<\/b> part of the HTTP header determines the format. Supported values are described below.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">The <b>Range:<\/b> part of the HTTP header determines the range of events returned. Supported values are described below.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">GET parameters can be used to modify what events are returned. Supported parameters are described below.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">\/machine<\/p>\n<p style=\"margin-left:17%;\">Return a JSON structure describing the machine.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Example:<\/p>\n<p style=\"margin-left:23%; margin-top: 1em\">{ &#8220;machine_id&#8221; : &#8220;8cf7ed9d451ea194b77a9f118f3dc446&#8221;, <br \/> &#8220;boot_id&#8221; : &#8220;3d3c9efaf556496a9b04259ee35df7f7&#8221;, <br \/> &#8220;hostname&#8221; : &#8220;fedora&#8221;, <br \/> &#8220;os_pretty_name&#8221; : &#8220;Fedora 19 (Rawhide)&#8221;, <br \/> &#8220;virtualization&#8221; : &#8220;kvm&#8221;, <br \/> &#8230;}<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">\/fields\/<i>FIELD_NAME<\/i><\/p>\n<p style=\"margin-left:17%;\">Return a list of values of this field present in the logs.<\/p>\n<h2>ACCEPT HEADER <a name=\"ACCEPT HEADER\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Accept:<\/b> <i>format<\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Recognized formats:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>text\/plain<\/b><\/p>\n<p style=\"margin-left:17%;\">The default. Plaintext syslog\u2212like output, one line per journal entry (like <b>journalctl \u2212\u2212output short<\/b>).<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>application\/json<\/b><\/p>\n<p style=\"margin-left:17%;\">Entries are formatted as JSON data structures, one per line (like <b>journalctl \u2212\u2212output json<\/b>). See <b><font color=\"#0000FF\">Journal JSON Format<\/font><\/b> <small><font color=\"#000000\">[1]<\/font><\/small> <font color=\"#000000\">for more information.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>text\/event\u2212stream<\/b><\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Entries are formatted as JSON data structures, wrapped in a format suitable for<\/font> <b><font color=\"#0000FF\">Server\u2212Sent Events<\/font><\/b> <small><font color=\"#000000\">[2]<\/font><\/small> <font color=\"#000000\">(like <b>journalctl \u2212\u2212output json\u2212sse<\/b>).<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>application\/vnd.fdo.journal<\/b><\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Entries are serialized into a binary (but mostly text\u2212based) stream suitable for backups and network transfer (like <b>journalctl \u2212\u2212output export<\/b>). See<\/font> <b><font color=\"#0000FF\">Journal Export Format<\/font><\/b> <small><font color=\"#000000\">[3]<\/font><\/small> <font color=\"#000000\">for more information.<\/font><\/p>\n<h2>RANGE HEADER <a name=\"RANGE HEADER\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>Range: entries=<\/b><i>cursor<\/i><b>[[:<\/b><i>num_skip<\/i><b>]:<\/b><i>num_entries<\/i><b>]<\/b><\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">where <i>cursor<\/i> is a cursor string, <i>num_skip<\/i> is an integer, <i>num_entries<\/i> is an unsigned integer.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">Range defaults to all available events.<\/font><\/p>\n<h2>URL GET PARAMETERS <a name=\"URL GET PARAMETERS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">Following parameters can be used as part of the URL:<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">follow<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">wait for new events (like <b>journalctl \u2212\u2212follow<\/b>, except that the number of events returned is not limited).<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">discrete<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Test that the specified cursor refers to an entry in the journal. Returns just this entry.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">boot<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Limit events to the current boot of the system (like <b>journalctl \u2212b<\/b>).<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><i>KEY<\/i>=<i>match<\/i><\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Match journal fields. See <b>systemd.journal-fields<\/b>(7).<\/font><\/p>\n<h2>EXAMPLES <a name=\"EXAMPLES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">Retrieve events from this boot from local journal in<\/font> <b><font color=\"#0000FF\">Journal Export Format<\/font><\/b> <small><font color=\"#000000\">[3]<\/font><\/small> <font color=\"#000000\">:<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">curl \u2212\u2212silent \u2212H&#8217;Accept: application\/vnd.fdo.journal&#8217;  <br \/> &#8216;http:\/\/localhost:19531\/entries?boot&#8217;<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">Listen for core dumps:<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">curl &#8216;http:\/\/localhost:19531\/entries?follow&#038;MESSAGE_ID=fc2e22bc6ee647b6b90729ab34a250b1&#8217;<\/font><\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>systemd<\/b>(1), <b>journalctl<\/b>(1), <b>systemd.journal-fields<\/b>(7), <b>systemd-journald.service<\/b>(8), <b>systemd-journal-remote.service<\/b>(8), <b>systemd-journal-upload.service<\/b>(8)<\/font><\/p>\n<h2>NOTES <a name=\"NOTES\"><\/a> <\/h2>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"12%\"><\/td>\n<td width=\"3%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">1.<\/font><\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"29%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">Journal JSON Format<\/font><\/p>\n<\/td>\n<td width=\"54%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">https:\/\/www.freedesktop.org\/wiki\/Software\/systemd\/json<\/font><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"12%\"><\/td>\n<td width=\"3%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">2.<\/font><\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"28%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">Server-Sent Events<\/font><\/p>\n<\/td>\n<td width=\"55%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">https:\/\/developer.mozilla.org\/en-US\/docs\/Server-sent_events\/Using_server-sent_events<\/font><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"12%\"><\/td>\n<td width=\"3%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">3.<\/font><\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"32%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">Journal Export Format<\/font><\/p>\n<\/td>\n<td width=\"51%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">https:\/\/www.freedesktop.org\/wiki\/Software\/systemd\/export<\/font><\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  systemd-journal-gatewayd.service, systemd-journal-gatewayd.socket, systemd-journal-gatewayd \u2212 HTTP server for journal events <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[5,52,4,357],"class_list":["post-3218","post","type-post","status-publish","format-standard","hentry","category-8-administracion-del-sistema","tag-5","tag-administracion","tag-man8","tag-systemd-journal-gatewayd"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3218","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=3218"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3218\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=3218"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=3218"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=3218"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}