]>
Commit | Line | Data |
---|---|---|
14228c0d | 1 | '\" t |
e3bff60a | 2 | .TH "SYSTEMD\-JOURNAL\-GATEWAYD\&.SERVICE" "8" "" "systemd 220" "systemd-journal-gatewayd.service" |
14228c0d MB |
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 | |
14228c0d MB |
49 | \fB\-\-cert=\fR |
50 | .RS 4 | |
51 | Specify the path to a file containing a server certificate in PEM format\&. This option switches | |
52 | \fBsystemd\-journal\-gatewayd\fR | |
53 | into HTTPS mode and must be used together with | |
54 | \fB\-\-key=\fR\&. | |
55 | .RE | |
56 | .PP | |
57 | \fB\-\-key=\fR | |
58 | .RS 4 | |
59 | Specify the path to a file containing a server key in PEM format corresponding to the certificate specified with | |
60 | \fB\-\-cert=\fR\&. | |
61 | .RE | |
60f067b4 JS |
62 | .PP |
63 | \fB\-h\fR, \fB\-\-help\fR | |
64 | .RS 4 | |
65 | Print a short help text and exit\&. | |
66 | .RE | |
67 | .PP | |
68 | \fB\-\-version\fR | |
69 | .RS 4 | |
70 | Print a short version string and exit\&. | |
71 | .RE | |
14228c0d MB |
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 | \&.\&.\&.} | |
14228c0d MB |
112 | .fi |
113 | .if n \{\ | |
114 | .RE | |
115 | .\} | |
116 | .sp | |
117 | .RE | |
118 | .PP | |
119 | /fields/\fIFIELD_NAME\fR | |
120 | .RS 4 | |
121 | Return a list of values of this field present in the logs\&. | |
122 | .RE | |
123 | .SH "ACCEPT HEADER" | |
124 | .PP | |
125 | \fBAccept: \fR\fB\fIformat\fR\fR | |
126 | .PP | |
127 | Recognized formats: | |
128 | .PP | |
129 | \fBtext/plain\fR | |
130 | .RS 4 | |
131 | The default\&. Plaintext syslog\-like output, one line per journal entry (like | |
132 | \fBjournalctl \-\-output short\fR)\&. | |
133 | .RE | |
134 | .PP | |
135 | \fBapplication/json\fR | |
136 | .RS 4 | |
137 | Entries are formatted as JSON data structures, one per line (like | |
138 | \fBjournalctl \-\-output json\fR)\&. See | |
139 | \m[blue]\fBJournal JSON Format\fR\m[]\&\s-2\u[1]\d\s+2 | |
140 | for more information\&. | |
141 | .RE | |
142 | .PP | |
143 | \fBapplication/event\-stream\fR | |
144 | .RS 4 | |
145 | Entries are formatted as JSON data structures, wrapped in a format suitable for | |
146 | \m[blue]\fBServer\-Sent Events\fR\m[]\&\s-2\u[2]\d\s+2 | |
147 | (like | |
148 | \fBjournalctl \-\-output json\-sse\fR)\&. | |
149 | .RE | |
150 | .PP | |
151 | \fBapplication/vnd\&.fdo\&.journal\fR | |
152 | .RS 4 | |
153 | Entries are serialized into a binary (but mostly text\-based) stream suitable for backups and network transfer (like | |
154 | \fBjournalctl \-\-output export\fR)\&. See | |
155 | \m[blue]\fBJournal Export Format\fR\m[]\&\s-2\u[3]\d\s+2 | |
156 | for more information\&. | |
157 | .RE | |
158 | .SH "RANGE HEADER" | |
159 | .PP | |
160 | \fBRange: entries=\fR\fB\fIcursor\fR\fR\fB[[:\fR\fB\fInum_skip\fR\fR\fB]:\fR\fB\fInum_entries\fR\fR\fB]\fR | |
161 | .PP | |
162 | where | |
163 | \fBcursor\fR | |
164 | is a cursor string, | |
165 | \fBnum_skip\fR | |
166 | is an integer, | |
167 | \fBnum_entries\fR | |
168 | is an unsigned integer\&. | |
169 | .PP | |
170 | Range defaults to all available events\&. | |
171 | .SH "URL GET PARAMETERS" | |
172 | .PP | |
173 | Following parameters can be used as part of the URL: | |
174 | .PP | |
175 | follow | |
176 | .RS 4 | |
177 | wait for new events (like | |
178 | \fBjournalctl \-\-follow\fR, except that the number of events returned is not limited)\&. | |
179 | .RE | |
180 | .PP | |
181 | discrete | |
182 | .RS 4 | |
183 | Test that the specified cursor refers to an entry in the journal\&. Returns just this entry\&. | |
184 | .RE | |
185 | .PP | |
186 | boot | |
187 | .RS 4 | |
188 | Limit events to the current boot of the system (like | |
189 | \fBjournalctl \-\-this\-\-boot\fR)\&. | |
190 | .RE | |
191 | .PP | |
192 | \fIKEY\fR=\fImatch\fR | |
193 | .RS 4 | |
194 | Match journal fields\&. See | |
195 | \fBsystemd.journal-fields\fR(7)\&. | |
196 | .RE | |
197 | .SH "EXAMPLES" | |
198 | .PP | |
199 | Retrieve events from this boot from local journal in | |
200 | \m[blue]\fBJournal Export Format\fR\m[]\&\s-2\u[3]\d\s+2: | |
201 | .sp | |
202 | .if n \{\ | |
203 | .RS 4 | |
204 | .\} | |
205 | .nf | |
206 | curl \-\-silent \-H\*(AqAccept: application/vnd\&.fdo\&.journal\*(Aq \e | |
207 | \*(Aqhttp://localhost:19531/entries?boot\*(Aq | |
14228c0d MB |
208 | .fi |
209 | .if n \{\ | |
210 | .RE | |
211 | .\} | |
212 | .PP | |
213 | Listen for core dumps: | |
214 | .sp | |
215 | .if n \{\ | |
216 | .RS 4 | |
217 | .\} | |
218 | .nf | |
219 | curl \*(Aqhttp://localhost:19531/entries?follow&MESSAGE_ID=fc2e22bc6ee647b6b90729ab34a250b1\*(Aq | |
14228c0d MB |
220 | .fi |
221 | .if n \{\ | |
222 | .RE | |
223 | .\} | |
224 | .SH "SEE ALSO" | |
225 | .PP | |
226 | \fBsystemd\fR(1), | |
227 | \fBjournalctl\fR(1), | |
228 | \fBsystemd-journald.service\fR(8), | |
229 | \fBsystemd.journal-fields\fR(7), | |
230 | .SH "NOTES" | |
231 | .IP " 1." 4 | |
232 | Journal JSON Format | |
233 | .RS 4 | |
234 | \%http://www.freedesktop.org/wiki/Software/systemd/json | |
235 | .RE | |
236 | .IP " 2." 4 | |
237 | Server-Sent Events | |
238 | .RS 4 | |
239 | \%https://developer.mozilla.org/en-US/docs/Server-sent_events/Using_server-sent_events | |
240 | .RE | |
241 | .IP " 3." 4 | |
242 | Journal Export Format | |
243 | .RS 4 | |
244 | \%http://www.freedesktop.org/wiki/Software/systemd/export | |
245 | .RE |