1SYSTEMD.JOURNAL-FIELDS(7)   systemd.journal-fields   SYSTEMD.JOURNAL-FIELDS(7)
2
3
4

NAME

6       systemd.journal-fields - Special journal fields
7

DESCRIPTION

9       Entries in the journal (as written by systemd-journald.service(8))
10       resemble a UNIX process environment block in syntax but with fields
11       that may include binary data. Primarily, fields are formatted UTF-8
12       text strings, and binary encoding is used only where formatting as
13       UTF-8 text strings makes little sense. New fields may freely be defined
14       by applications, but a few fields have special meanings. All fields
15       with special meanings are optional. In some cases, fields may appear
16       more than once per entry.
17

USER JOURNAL FIELDS

19       User fields are fields that are directly passed from clients and stored
20       in the journal.
21
22       MESSAGE=
23           The human-readable message string for this entry. This is supposed
24           to be the primary text shown to the user. It is usually not
25           translated (but might be in some cases), and is not supposed to be
26           parsed for metadata.
27
28       MESSAGE_ID=
29           A 128-bit message identifier ID for recognizing certain message
30           types, if this is desirable. This should contain a 128-bit ID
31           formatted as a lower-case hexadecimal string, without any
32           separating dashes or suchlike. This is recommended to be a
33           UUID-compatible ID, but this is not enforced, and formatted
34           differently. Developers can generate a new ID for this purpose with
35           systemd-id128 new.
36
37       PRIORITY=
38           A priority value between 0 ("emerg") and 7 ("debug") formatted as a
39           decimal string. This field is compatible with syslog's priority
40           concept.
41
42       CODE_FILE=, CODE_LINE=, CODE_FUNC=
43           The code location generating this message, if known. Contains the
44           source filename, the line number and the function name.
45
46       ERRNO=
47           The low-level Unix error number causing this entry, if any.
48           Contains the numeric value of errno(3) formatted as a decimal
49           string.
50
51       INVOCATION_ID=, USER_INVOCATION_ID=
52           A randomized, unique 128-bit ID identifying each runtime cycle of
53           the unit. This is different from _SYSTEMD_INVOCATION_ID in that it
54           is only used for messages coming from systemd code (e.g. logs from
55           the system/user manager or from forked processes performing
56           systemd-related setup).
57
58       SYSLOG_FACILITY=, SYSLOG_IDENTIFIER=, SYSLOG_PID=, SYSLOG_TIMESTAMP=
59           Syslog compatibility fields containing the facility (formatted as
60           decimal string), the identifier string (i.e. "tag"), the client
61           PID, and the timestamp as specified in the original datagram. (Note
62           that the tag is usually derived from glibc's
63           program_invocation_short_name variable, see
64           program_invocation_short_name(3).)
65
66           Note that the journal service does not validate the values of any
67           structured journal fields whose name is not prefixed with an
68           underscore, and this includes any syslog related fields such as
69           these. Hence, applications that supply a facility, PID, or log
70           level are expected to do so properly formatted, i.e. as numeric
71           integers formatted as decimal strings.
72
73       SYSLOG_RAW=
74           The original contents of the syslog line as received in the syslog
75           datagram. This field is only included if the MESSAGE= field was
76           modified compared to the original payload or the timestamp could
77           not be located properly and is not included in SYSLOG_TIMESTAMP=.
78           Message truncation occurs when when the message contains leading or
79           trailing whitespace (trailing and leading whitespace is stripped),
80           or it contains an embedded NUL byte (the NUL byte and anything
81           after it is not included). Thus, the original syslog line is either
82           stored as SYSLOG_RAW= or it can be recreated based on the stored
83           priority and facility, timestamp, identifier, and the message
84           payload in MESSAGE=.
85
86       DOCUMENTATION=
87           A documentation URL with further information about the topic of the
88           log message. Tools such as journalctl will include a hyperlink to
89           an URL specified this way in their output. Should be a "http://",
90           "https://", "file:/", "man:" or "info:" URL.
91
92       TID=
93           The numeric thread ID (TID) the log message originates from.
94

TRUSTED JOURNAL FIELDS

96       Fields prefixed with an underscore are trusted fields, i.e. fields that
97       are implicitly added by the journal and cannot be altered by client
98       code.
99
100       _PID=, _UID=, _GID=
101           The process, user, and group ID of the process the journal entry
102           originates from formatted as a decimal string. Note that entries
103           obtained via "stdout" or "stderr" of forked processes will contain
104           credentials valid for a parent process (that initiated the
105           connection to systemd-journald).
106
107       _COMM=, _EXE=, _CMDLINE=
108           The name, the executable path, and the command line of the process
109           the journal entry originates from.
110
111       _CAP_EFFECTIVE=
112           The effective capabilities(7) of the process the journal entry
113           originates from.
114
115       _AUDIT_SESSION=, _AUDIT_LOGINUID=
116           The session and login UID of the process the journal entry
117           originates from, as maintained by the kernel audit subsystem.
118
119       _SYSTEMD_CGROUP=, _SYSTEMD_SLICE=, _SYSTEMD_UNIT=, _SYSTEMD_USER_UNIT=,
120       _SYSTEMD_USER_SLICE=, _SYSTEMD_SESSION=, _SYSTEMD_OWNER_UID=
121           The control group path in the systemd hierarchy, the systemd slice
122           unit name, the systemd unit name, the unit name in the systemd user
123           manager (if any), the systemd session ID (if any), and the owner
124           UID of the systemd user unit or systemd session (if any) of the
125           process the journal entry originates from.
126
127       _SELINUX_CONTEXT=
128           The SELinux security context (label) of the process the journal
129           entry originates from.
130
131       _SOURCE_REALTIME_TIMESTAMP=
132           The earliest trusted timestamp of the message, if any is known that
133           is different from the reception time of the journal. This is the
134           time in microseconds since the epoch UTC, formatted as a decimal
135           string.
136
137       _BOOT_ID=
138           The kernel boot ID for the boot the message was generated in,
139           formatted as a 128-bit hexadecimal string.
140
141       _MACHINE_ID=
142           The machine ID of the originating host, as available in machine-
143           id(5).
144
145       _SYSTEMD_INVOCATION_ID=
146           The invocation ID for the runtime cycle of the unit the message was
147           generated in, as available to processes of the unit in
148           $INVOCATION_ID (see systemd.exec(5)).
149
150       _HOSTNAME=
151           The name of the originating host.
152
153       _TRANSPORT=
154           How the entry was received by the journal service. Valid transports
155           are:
156
157           audit
158               for those read from the kernel audit subsystem
159
160           driver
161               for internally generated messages
162
163           syslog
164               for those received via the local syslog socket with the syslog
165               protocol
166
167           journal
168               for those received via the native journal protocol
169
170           stdout
171               for those read from a service's standard output or error output
172
173           kernel
174               for those read from the kernel
175
176       _STREAM_ID=
177           Only applies to "_TRANSPORT=stdout" records: specifies a randomized
178           128bit ID assigned to the stream connection when it was first
179           created. This ID is useful to reconstruct individual log streams
180           from the log records: all log records carrying the same stream ID
181           originate from the same stream.
182
183       _LINE_BREAK=
184           Only applies to "_TRANSPORT=stdout" records: indicates that the log
185           message in the standard output/error stream was not terminated with
186           a normal newline character ("\n", i.e. ASCII 10). Specifically,
187           when set this field is one of nul (in case the line was terminated
188           by a NUL byte), line-max (in case the maximum log line length was
189           reached, as configured with LineMax= in journald.conf(5)), eof (if
190           this was the last log record of a stream and the stream ended
191           without a final newline character), or pid-change (if the process
192           which generated the log output changed in the middle of a line).
193           Note that this record is not generated when a normal newline
194           character was used for marking the log line end.
195
196       _NAMESPACE=
197           If this file was written by a systemd-journald instance managing a
198           journal namespace that is not the default, this field contains the
199           namespace identifier. See systemd-journald.service(8) for details
200           about journal namespaces.
201

KERNEL JOURNAL FIELDS

203       Kernel fields are fields that are used by messages originating in the
204       kernel and stored in the journal.
205
206       _KERNEL_DEVICE=
207           The kernel device name. If the entry is associated to a block
208           device, contains the major and minor numbers of the device node,
209           separated by ":" and prefixed by "b". Similarly for character
210           devices, but prefixed by "c". For network devices, this is the
211           interface index prefixed by "n". For all other devices, this is the
212           subsystem name prefixed by "+", followed by ":", followed by the
213           kernel device name.
214
215       _KERNEL_SUBSYSTEM=
216           The kernel subsystem name.
217
218       _UDEV_SYSNAME=
219           The kernel device name as it shows up in the device tree below
220           /sys/.
221
222       _UDEV_DEVNODE=
223           The device node path of this device in /dev/.
224
225       _UDEV_DEVLINK=
226           Additional symlink names pointing to the device node in /dev/. This
227           field is frequently set more than once per entry.
228

FIELDS TO LOG ON BEHALF OF A DIFFERENT PROGRAM

230       Fields in this section are used by programs to specify that they are
231       logging on behalf of another program or unit.
232
233       Fields used by the systemd-coredump coredump kernel helper:
234
235       COREDUMP_UNIT=, COREDUMP_USER_UNIT=
236           Used to annotate messages containing coredumps from system and
237           session units. See coredumpctl(1).
238
239       Privileged programs (currently UID 0) may attach OBJECT_PID= to a
240       message. This will instruct systemd-journald to attach additional
241       fields on behalf of the caller:
242
243       OBJECT_PID=PID
244           PID of the program that this message pertains to.
245
246       OBJECT_UID=, OBJECT_GID=, OBJECT_COMM=, OBJECT_EXE=, OBJECT_CMDLINE=,
247       OBJECT_AUDIT_SESSION=, OBJECT_AUDIT_LOGINUID=, OBJECT_SYSTEMD_CGROUP=,
248       OBJECT_SYSTEMD_SESSION=, OBJECT_SYSTEMD_OWNER_UID=,
249       OBJECT_SYSTEMD_UNIT=, OBJECT_SYSTEMD_USER_UNIT=
250           These are additional fields added automatically by
251           systemd-journald. Their meaning is the same as _UID=, _GID=,
252           _COMM=, _EXE=, _CMDLINE=, _AUDIT_SESSION=, _AUDIT_LOGINUID=,
253           _SYSTEMD_CGROUP=, _SYSTEMD_SESSION=, _SYSTEMD_UNIT=,
254           _SYSTEMD_USER_UNIT=, and _SYSTEMD_OWNER_UID= as described above,
255           except that the process identified by PID is described, instead of
256           the process which logged the message.
257

ADDRESS FIELDS

259       During serialization into external formats, such as the Journal Export
260       Format[1] or the Journal JSON Format[2], the addresses of journal
261       entries are serialized into fields prefixed with double underscores.
262       Note that these are not proper fields when stored in the journal but
263       for addressing metadata of entries. They cannot be written as part of
264       structured log entries via calls such as sd_journal_send(3). They may
265       also not be used as matches for sd_journal_add_match(3).
266
267       __CURSOR=
268           The cursor for the entry. A cursor is an opaque text string that
269           uniquely describes the position of an entry in the journal and is
270           portable across machines, platforms and journal files.
271
272       __REALTIME_TIMESTAMP=
273           The wallclock time (CLOCK_REALTIME) at the point in time the entry
274           was received by the journal, in microseconds since the epoch UTC,
275           formatted as a decimal string. This has different properties from
276           "_SOURCE_REALTIME_TIMESTAMP=", as it is usually a bit later but
277           more likely to be monotonic.
278
279       __MONOTONIC_TIMESTAMP=
280           The monotonic time (CLOCK_MONOTONIC) at the point in time the entry
281           was received by the journal in microseconds, formatted as a decimal
282           string. To be useful as an address for the entry, this should be
283           combined with the boot ID in "_BOOT_ID=".
284

SEE ALSO

286       systemd(1), systemd-journald.service(8), journalctl(1),
287       journald.conf(5), sd-journal(3), coredumpctl(1), systemd.directives(7)
288

NOTES

290        1. Journal Export Format
291           https://www.freedesktop.org/wiki/Software/systemd/export
292
293        2. Journal JSON Format
294           https://www.freedesktop.org/wiki/Software/systemd/json
295
296
297
298systemd 248                                          SYSTEMD.JOURNAL-FIELDS(7)
Impressum