]> git.proxmox.com Git - systemd.git/blob - man/systemd-journal-gatewayd.service.8
Imported Upstream version 208
[systemd.git] / man / systemd-journal-gatewayd.service.8
1 '\" t
2 .TH "SYSTEMD\-JOURNAL\-GATEWAYD\&.SERVICE" "8" "" "systemd 208" "systemd-journal-gatewayd.service"
3 .\" -----------------------------------------------------------------
4 .\" * Define some portability stuff
5 .\" -----------------------------------------------------------------
6 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7 .\" http://bugs.debian.org/507673
8 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
9 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10 .ie \n(.g .ds Aq \(aq
11 .el .ds Aq '
12 .\" -----------------------------------------------------------------
13 .\" * set default formatting
14 .\" -----------------------------------------------------------------
15 .\" disable hyphenation
16 .nh
17 .\" disable justification (adjust text to left margin only)
18 .ad l
19 .\" -----------------------------------------------------------------
20 .\" * MAIN CONTENT STARTS HERE *
21 .\" -----------------------------------------------------------------
22 .SH "NAME"
23 systemd-journal-gatewayd.service, systemd-journal-gatewayd.socket, systemd-journal-gatewayd \- HTTP server for journal events
24 .SH "SYNOPSIS"
25 .PP
26 systemd\-journal\-gatewayd\&.service
27 .PP
28 systemd\-journal\-gatewayd\&.socket
29 .HP \w'\fB/usr/lib/systemd/systemd\-journal\-gatewayd\fR\ 'u
30 \fB/usr/lib/systemd/systemd\-journal\-gatewayd\fR [OPTIONS...]
31 .SH "DESCRIPTION"
32 .PP
33 \fBsystemd\-journal\-gatewayd\fR
34 serves journal events over the network\&. Clients must connect using HTTP\&. The server listens on port 19531 by default\&. If
35 \fB\-\-cert=\fR
36 is specified, the server expects HTTPS connections\&.
37 .PP
38 The program is started by
39 \fBsystemd\fR(1)
40 and expects to receive a single socket\&. Use
41 \fBsystemctl start systemd\-journal\-gatewayd\&.socket\fR
42 to start the service, and
43 \fBsystemctl enable systemd\-journal\-gatewayd\&.socket\fR
44 to have it started on boot\&.
45 .SH "OPTIONS"
46 .PP
47 The following options are understood:
48 .PP
49 \fB\-\-help\fR, \fB\-h\fR
50 .RS 4
51 Prints a short help text and exits\&.
52 .RE
53 .PP
54 \fB\-\-version\fR
55 .RS 4
56 Prints a short version string and exits\&.
57 .RE
58 .PP
59 \fB\-\-cert=\fR
60 .RS 4
61 Specify the path to a file containing a server certificate in PEM format\&. This option switches
62 \fBsystemd\-journal\-gatewayd\fR
63 into HTTPS mode and must be used together with
64 \fB\-\-key=\fR\&.
65 .RE
66 .PP
67 \fB\-\-key=\fR
68 .RS 4
69 Specify the path to a file containing a server key in PEM format corresponding to the certificate specified with
70 \fB\-\-cert=\fR\&.
71 .RE
72 .SH "SUPPORTED URLS"
73 .PP
74 The following URLs are recognized:
75 .PP
76 /browse
77 .RS 4
78 Interactive browsing\&.
79 .RE
80 .PP
81 /entries[?option1&option2=value\&.\&.\&.]
82 .RS 4
83 Retrieval of events in various formats\&.
84 .sp
85 The
86 \fBAccept:\fR
87 part of the HTTP header determines the format\&. Supported values are described below\&.
88 .sp
89 The
90 \fBRange:\fR
91 part of the HTTP header determines the range of events returned\&. Supported values are described below\&.
92 .sp
93 GET parameters can be used to modify what events are returned\&. Supported parameters are described below\&.
94 .RE
95 .PP
96 /machine
97 .RS 4
98 Return a JSON structure describing the machine\&.
99 .sp
100 Example:
101 .sp
102 .if n \{\
103 .RS 4
104 .\}
105 .nf
106 { "machine_id" : "8cf7ed9d451ea194b77a9f118f3dc446",
107 "boot_id" : "3d3c9efaf556496a9b04259ee35df7f7",
108 "hostname" : "fedora",
109 "os_pretty_name" : "Fedora 19 (Rawhide)",
110 "virtualization" : "kvm",
111 \&.\&.\&.}
112
113 .fi
114 .if n \{\
115 .RE
116 .\}
117 .sp
118 .RE
119 .PP
120 /fields/\fIFIELD_NAME\fR
121 .RS 4
122 Return a list of values of this field present in the logs\&.
123 .RE
124 .SH "ACCEPT HEADER"
125 .PP
126 \fBAccept: \fR\fB\fIformat\fR\fR
127 .PP
128 Recognized formats:
129 .PP
130 \fBtext/plain\fR
131 .RS 4
132 The default\&. Plaintext syslog\-like output, one line per journal entry (like
133 \fBjournalctl \-\-output short\fR)\&.
134 .RE
135 .PP
136 \fBapplication/json\fR
137 .RS 4
138 Entries are formatted as JSON data structures, one per line (like
139 \fBjournalctl \-\-output json\fR)\&. See
140 \m[blue]\fBJournal JSON Format\fR\m[]\&\s-2\u[1]\d\s+2
141 for more information\&.
142 .RE
143 .PP
144 \fBapplication/event\-stream\fR
145 .RS 4
146 Entries are formatted as JSON data structures, wrapped in a format suitable for
147 \m[blue]\fBServer\-Sent Events\fR\m[]\&\s-2\u[2]\d\s+2
148 (like
149 \fBjournalctl \-\-output json\-sse\fR)\&.
150 .RE
151 .PP
152 \fBapplication/vnd\&.fdo\&.journal\fR
153 .RS 4
154 Entries are serialized into a binary (but mostly text\-based) stream suitable for backups and network transfer (like
155 \fBjournalctl \-\-output export\fR)\&. See
156 \m[blue]\fBJournal Export Format\fR\m[]\&\s-2\u[3]\d\s+2
157 for more information\&.
158 .RE
159 .SH "RANGE HEADER"
160 .PP
161 \fBRange: entries=\fR\fB\fIcursor\fR\fR\fB[[:\fR\fB\fInum_skip\fR\fR\fB]:\fR\fB\fInum_entries\fR\fR\fB]\fR
162 .PP
163 where
164 \fBcursor\fR
165 is a cursor string,
166 \fBnum_skip\fR
167 is an integer,
168 \fBnum_entries\fR
169 is an unsigned integer\&.
170 .PP
171 Range defaults to all available events\&.
172 .SH "URL GET PARAMETERS"
173 .PP
174 Following parameters can be used as part of the URL:
175 .PP
176 follow
177 .RS 4
178 wait for new events (like
179 \fBjournalctl \-\-follow\fR, except that the number of events returned is not limited)\&.
180 .RE
181 .PP
182 discrete
183 .RS 4
184 Test that the specified cursor refers to an entry in the journal\&. Returns just this entry\&.
185 .RE
186 .PP
187 boot
188 .RS 4
189 Limit events to the current boot of the system (like
190 \fBjournalctl \-\-this\-\-boot\fR)\&.
191 .RE
192 .PP
193 \fIKEY\fR=\fImatch\fR
194 .RS 4
195 Match journal fields\&. See
196 \fBsystemd.journal-fields\fR(7)\&.
197 .RE
198 .SH "EXAMPLES"
199 .PP
200 Retrieve events from this boot from local journal in
201 \m[blue]\fBJournal Export Format\fR\m[]\&\s-2\u[3]\d\s+2:
202 .sp
203 .if n \{\
204 .RS 4
205 .\}
206 .nf
207 curl \-\-silent \-H\*(AqAccept: application/vnd\&.fdo\&.journal\*(Aq \e
208 \*(Aqhttp://localhost:19531/entries?boot\*(Aq
209
210 .fi
211 .if n \{\
212 .RE
213 .\}
214 .PP
215 Listen for core dumps:
216 .sp
217 .if n \{\
218 .RS 4
219 .\}
220 .nf
221 curl \*(Aqhttp://localhost:19531/entries?follow&MESSAGE_ID=fc2e22bc6ee647b6b90729ab34a250b1\*(Aq
222
223 .fi
224 .if n \{\
225 .RE
226 .\}
227 .SH "SEE ALSO"
228 .PP
229 \fBsystemd\fR(1),
230 \fBjournalctl\fR(1),
231 \fBsystemd-journald.service\fR(8),
232 \fBsystemd.journal-fields\fR(7),
233 .SH "NOTES"
234 .IP " 1." 4
235 Journal JSON Format
236 .RS 4
237 \%http://www.freedesktop.org/wiki/Software/systemd/json
238 .RE
239 .IP " 2." 4
240 Server-Sent Events
241 .RS 4
242 \%https://developer.mozilla.org/en-US/docs/Server-sent_events/Using_server-sent_events
243 .RE
244 .IP " 3." 4
245 Journal Export Format
246 .RS 4
247 \%http://www.freedesktop.org/wiki/Software/systemd/export
248 .RE