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