1SYSTEMD.JOURNAL-FIELDS(7) systemd.journal-fields SYSTEMD.JOURNAL-FIELDS(7)
2
3
4
6 systemd.journal-fields - Special journal fields
7
9 Entries in the journal resemble an environment block in their syntax
10 but with fields that can include binary data. Primarily, fields are
11 formatted UTF-8 text strings, and binary formatting is used only where
12 formatting as UTF-8 text strings makes little sense. New fields may
13 freely be defined by applications, but a few fields have special
14 meaning. All fields with special meanings are optional. In some cases,
15 fields may appear more than once per entry.
16
18 User fields are fields that are directly passed from clients and stored
19 in the journal.
20
21 MESSAGE=
22 The human-readable message string for this entry. This is supposed
23 to be the primary text shown to the user. It is usually not
24 translated (but might be in some cases), and is not supposed to be
25 parsed for metadata.
26
27 MESSAGE_ID=
28 A 128-bit message identifier ID for recognizing certain message
29 types, if this is desirable. This should contain a 128-bit ID
30 formatted as a lower-case hexadecimal string, without any
31 separating dashes or suchlike. This is recommended to be a
32 UUID-compatible ID, but this is not enforced, and formatted
33 differently. Developers can generate a new ID for this purpose with
34 systemd-id128 new.
35
36 PRIORITY=
37 A priority value between 0 ("emerg") and 7 ("debug") formatted as a
38 decimal string. This field is compatible with syslog's priority
39 concept.
40
41 CODE_FILE=, CODE_LINE=, CODE_FUNC=
42 The code location generating this message, if known. Contains the
43 source filename, the line number and the function name.
44
45 ERRNO=
46 The low-level Unix error number causing this entry, if any.
47 Contains the numeric value of errno(3) formatted as a decimal
48 string.
49
50 SYSLOG_FACILITY=, SYSLOG_IDENTIFIER=, SYSLOG_PID=, SYSLOG_TIMESTAMP=
51 Syslog compatibility fields containing the facility (formatted as
52 decimal string), the identifier string (i.e. "tag"), the client
53 PID, and the timestamp as specified in the original datagram. (Note
54 that the tag is usually derived from glibc's
55 program_invocation_short_name variable, see
56 program_invocation_short_name(3).)
57
58 SYSLOG_RAW=
59 The original contents of the syslog line as received in the syslog
60 datagram. This field is only included if the MESSAGE= field was
61 modified compared to the original payload or the timestamp could
62 not be located properly and is not included in SYSLOG_TIMESTAMP=.
63 Message truncation occurs when when the message contains leading or
64 trailing whitespace (trailing and leading whitespace is stripped),
65 or it contains an embedded NUL byte (the NUL byte and anything
66 after it is not included). Thus, the original syslog line is either
67 stored as SYSLOG_RAW= or it can be recreated based on the stored
68 priority and facility, timestamp, identifier, and the message
69 payload in MESSAGE=.
70
72 Fields prefixed with an underscore are trusted fields, i.e. fields that
73 are implicitly added by the journal and cannot be altered by client
74 code.
75
76 _PID=, _UID=, _GID=
77 The process, user, and group ID of the process the journal entry
78 originates from formatted as a decimal string. Note that entries
79 obtained via "stdout" or "stderr" of forked processes will contain
80 credentials valid for a parent process (that initiated the
81 connection to systemd-journald).
82
83 _COMM=, _EXE=, _CMDLINE=
84 The name, the executable path, and the command line of the process
85 the journal entry originates from.
86
87 _CAP_EFFECTIVE=
88 The effective capabilities(7) of the process the journal entry
89 originates from.
90
91 _AUDIT_SESSION=, _AUDIT_LOGINUID=
92 The session and login UID of the process the journal entry
93 originates from, as maintained by the kernel audit subsystem.
94
95 _SYSTEMD_CGROUP=, _SYSTEMD_SLICE=, _SYSTEMD_UNIT=, _SYSTEMD_USER_UNIT=,
96 _SYSTEMD_SESSION=, _SYSTEMD_OWNER_UID=
97 The control group path in the systemd hierarchy, the the systemd
98 slice unit name, the systemd unit name, the unit name in the
99 systemd user manager (if any), the systemd session ID (if any), and
100 the owner UID of the systemd user unit or systemd session (if any)
101 of the process the journal entry originates from.
102
103 _SELINUX_CONTEXT=
104 The SELinux security context (label) of the process the journal
105 entry originates from.
106
107 _SOURCE_REALTIME_TIMESTAMP=
108 The earliest trusted timestamp of the message, if any is known that
109 is different from the reception time of the journal. This is the
110 time in microseconds since the epoch UTC, formatted as a decimal
111 string.
112
113 _BOOT_ID=
114 The kernel boot ID for the boot the message was generated in,
115 formatted as a 128-bit hexadecimal string.
116
117 _MACHINE_ID=
118 The machine ID of the originating host, as available in machine-
119 id(5).
120
121 _SYSTEMD_INVOCATION_ID=
122 The invocation ID for the runtime cycle of the unit the message was
123 generated in, as available to processes of the unit in
124 $INVOCATION_ID (see systemd.exec(5)).
125
126 _HOSTNAME=
127 The name of the originating host.
128
129 _TRANSPORT=
130 How the entry was received by the journal service. Valid transports
131 are:
132
133 audit
134 for those read from the kernel audit subsystem
135
136 driver
137 for internally generated messages
138
139 syslog
140 for those received via the local syslog socket with the syslog
141 protocol
142
143 journal
144 for those received via the native journal protocol
145
146 stdout
147 for those read from a service's standard output or error output
148
149 kernel
150 for those read from the kernel
151
152 _STREAM_ID=
153 Only applies to "_TRANSPORT=stdout" records: specifies a randomized
154 128bit ID assigned to the stream connection when it was first
155 created. This ID is useful to reconstruct individual log streams
156 from the log records: all log records carrying the same stream ID
157 originate from the same stream.
158
159 _LINE_BREAK=
160 Only applies to "_TRANSPORT=stdout" records: indicates that the log
161 message in the standard output/error stream was not terminated with
162 a normal newline character ("\n", i.e. ASCII 10). Specifically,
163 when set this field is one of nul (in case the line was terminated
164 by a NUL byte), line-max (in case the maximum log line length was
165 reached, as configured with LineMax= in journald.conf(5)) or eof
166 (if this was the last log record of a stream and the stream ended
167 without a final newline character). Note that this record is not
168 generated when a normal newline character was used for marking the
169 log line end.
170
172 Kernel fields are fields that are used by messages originating in the
173 kernel and stored in the journal.
174
175 _KERNEL_DEVICE=
176 The kernel device name. If the entry is associated to a block
177 device, the major and minor of the device node, separated by ":"
178 and prefixed by "b". Similar for character devices but prefixed by
179 "c". For network devices, this is the interface index prefixed by
180 "n". For all other devices, this is the subsystem name prefixed by
181 "+", followed by ":", followed by the kernel device name.
182
183 _KERNEL_SUBSYSTEM=
184 The kernel subsystem name.
185
186 _UDEV_SYSNAME=
187 The kernel device name as it shows up in the device tree below
188 /sys.
189
190 _UDEV_DEVNODE=
191 The device node path of this device in /dev.
192
193 _UDEV_DEVLINK=
194 Additional symlink names pointing to the device node in /dev. This
195 field is frequently set more than once per entry.
196
198 Fields in this section are used by programs to specify that they are
199 logging on behalf of another program or unit.
200
201 Fields used by the systemd-coredump coredump kernel helper:
202
203 COREDUMP_UNIT=, COREDUMP_USER_UNIT=
204 Used to annotate messages containing coredumps from system and
205 session units. See coredumpctl(1).
206
207 Privileged programs (currently UID 0) may attach OBJECT_PID= to a
208 message. This will instruct systemd-journald to attach additional
209 fields on behalf of the caller:
210
211 OBJECT_PID=PID
212 PID of the program that this message pertains to.
213
214 OBJECT_UID=, OBJECT_GID=, OBJECT_COMM=, OBJECT_EXE=, OBJECT_CMDLINE=,
215 OBJECT_AUDIT_SESSION=, OBJECT_AUDIT_LOGINUID=, OBJECT_SYSTEMD_CGROUP=,
216 OBJECT_SYSTEMD_SESSION=, OBJECT_SYSTEMD_OWNER_UID=,
217 OBJECT_SYSTEMD_UNIT=, OBJECT_SYSTEMD_USER_UNIT=
218 These are additional fields added automatically by
219 systemd-journald. Their meaning is the same as _UID=, _GID=,
220 _COMM=, _EXE=, _CMDLINE=, _AUDIT_SESSION=, _AUDIT_LOGINUID=,
221 _SYSTEMD_CGROUP=, _SYSTEMD_SESSION=, _SYSTEMD_UNIT=,
222 _SYSTEMD_USER_UNIT=, and _SYSTEMD_OWNER_UID= as described above,
223 except that the process identified by PID is described, instead of
224 the process which logged the message.
225
227 During serialization into external formats, such as the Journal Export
228 Format[1] or the Journal JSON Format[2], the addresses of journal
229 entries are serialized into fields prefixed with double underscores.
230 Note that these are not proper fields when stored in the journal but
231 for addressing metadata of entries. They cannot be written as part of
232 structured log entries via calls such as sd_journal_send(3). They may
233 also not be used as matches for sd_journal_add_match(3)
234
235 __CURSOR=
236 The cursor for the entry. A cursor is an opaque text string that
237 uniquely describes the position of an entry in the journal and is
238 portable across machines, platforms and journal files.
239
240 __REALTIME_TIMESTAMP=
241 The wallclock time (CLOCK_REALTIME) at the point in time the entry
242 was received by the journal, in microseconds since the epoch UTC,
243 formatted as a decimal string. This has different properties from
244 "_SOURCE_REALTIME_TIMESTAMP=", as it is usually a bit later but
245 more likely to be monotonic.
246
247 __MONOTONIC_TIMESTAMP=
248 The monotonic time (CLOCK_MONOTONIC) at the point in time the entry
249 was received by the journal in microseconds, formatted as a decimal
250 string. To be useful as an address for the entry, this should be
251 combined with the boot ID in "_BOOT_ID=".
252
254 systemd(1), journalctl(1), journald.conf(5), sd-journal(3),
255 coredumpctl(1), systemd.directives(7)
256
258 1. Journal Export Format
259 https://www.freedesktop.org/wiki/Software/systemd/export
260
261 2. Journal JSON Format
262 https://www.freedesktop.org/wiki/Software/systemd/json
263
264
265
266systemd 241 SYSTEMD.JOURNAL-FIELDS(7)