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 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

USER JOURNAL FIELDS

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           Note that the journal service does not validate the values of any
59           structured journal fields whose name is not prefixed with an
60           underscore, and this includes any syslog related fields such as
61           these. Hence, applications that supply a facility, PID, or log
62           level are expected to do so properly formatted, i.e. as numeric
63           integers formatted as decimal strings.
64
65       SYSLOG_RAW=
66           The original contents of the syslog line as received in the syslog
67           datagram. This field is only included if the MESSAGE= field was
68           modified compared to the original payload or the timestamp could
69           not be located properly and is not included in SYSLOG_TIMESTAMP=.
70           Message truncation occurs when when the message contains leading or
71           trailing whitespace (trailing and leading whitespace is stripped),
72           or it contains an embedded NUL byte (the NUL byte and anything
73           after it is not included). Thus, the original syslog line is either
74           stored as SYSLOG_RAW= or it can be recreated based on the stored
75           priority and facility, timestamp, identifier, and the message
76           payload in MESSAGE=.
77

TRUSTED JOURNAL FIELDS

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

KERNEL JOURNAL FIELDS

179       Kernel fields are fields that are used by messages originating in the
180       kernel and stored in the journal.
181
182       _KERNEL_DEVICE=
183           The kernel device name. If the entry is associated to a block
184           device, the major and minor of the device node, separated by ":"
185           and prefixed by "b". Similar for character devices but prefixed by
186           "c". For network devices, this is the interface index prefixed by
187           "n". For all other devices, this is the subsystem name prefixed by
188           "+", followed by ":", followed by the kernel device name.
189
190       _KERNEL_SUBSYSTEM=
191           The kernel subsystem name.
192
193       _UDEV_SYSNAME=
194           The kernel device name as it shows up in the device tree below
195           /sys.
196
197       _UDEV_DEVNODE=
198           The device node path of this device in /dev.
199
200       _UDEV_DEVLINK=
201           Additional symlink names pointing to the device node in /dev. This
202           field is frequently set more than once per entry.
203

FIELDS TO LOG ON BEHALF OF A DIFFERENT PROGRAM

205       Fields in this section are used by programs to specify that they are
206       logging on behalf of another program or unit.
207
208       Fields used by the systemd-coredump coredump kernel helper:
209
210       COREDUMP_UNIT=, COREDUMP_USER_UNIT=
211           Used to annotate messages containing coredumps from system and
212           session units. See coredumpctl(1).
213
214       Privileged programs (currently UID 0) may attach OBJECT_PID= to a
215       message. This will instruct systemd-journald to attach additional
216       fields on behalf of the caller:
217
218       OBJECT_PID=PID
219           PID of the program that this message pertains to.
220
221       OBJECT_UID=, OBJECT_GID=, OBJECT_COMM=, OBJECT_EXE=, OBJECT_CMDLINE=,
222       OBJECT_AUDIT_SESSION=, OBJECT_AUDIT_LOGINUID=, OBJECT_SYSTEMD_CGROUP=,
223       OBJECT_SYSTEMD_SESSION=, OBJECT_SYSTEMD_OWNER_UID=,
224       OBJECT_SYSTEMD_UNIT=, OBJECT_SYSTEMD_USER_UNIT=
225           These are additional fields added automatically by
226           systemd-journald. Their meaning is the same as _UID=, _GID=,
227           _COMM=, _EXE=, _CMDLINE=, _AUDIT_SESSION=, _AUDIT_LOGINUID=,
228           _SYSTEMD_CGROUP=, _SYSTEMD_SESSION=, _SYSTEMD_UNIT=,
229           _SYSTEMD_USER_UNIT=, and _SYSTEMD_OWNER_UID= as described above,
230           except that the process identified by PID is described, instead of
231           the process which logged the message.
232

ADDRESS FIELDS

234       During serialization into external formats, such as the Journal Export
235       Format[1] or the Journal JSON Format[2], the addresses of journal
236       entries are serialized into fields prefixed with double underscores.
237       Note that these are not proper fields when stored in the journal but
238       for addressing metadata of entries. They cannot be written as part of
239       structured log entries via calls such as sd_journal_send(3). They may
240       also not be used as matches for sd_journal_add_match(3)
241
242       __CURSOR=
243           The cursor for the entry. A cursor is an opaque text string that
244           uniquely describes the position of an entry in the journal and is
245           portable across machines, platforms and journal files.
246
247       __REALTIME_TIMESTAMP=
248           The wallclock time (CLOCK_REALTIME) at the point in time the entry
249           was received by the journal, in microseconds since the epoch UTC,
250           formatted as a decimal string. This has different properties from
251           "_SOURCE_REALTIME_TIMESTAMP=", as it is usually a bit later but
252           more likely to be monotonic.
253
254       __MONOTONIC_TIMESTAMP=
255           The monotonic time (CLOCK_MONOTONIC) at the point in time the entry
256           was received by the journal in microseconds, formatted as a decimal
257           string. To be useful as an address for the entry, this should be
258           combined with the boot ID in "_BOOT_ID=".
259

SEE ALSO

261       systemd(1), journalctl(1), journald.conf(5), sd-journal(3),
262       coredumpctl(1), systemd.directives(7)
263

NOTES

265        1. Journal Export Format
266           https://www.freedesktop.org/wiki/Software/systemd/export
267
268        2. Journal JSON Format
269           https://www.freedesktop.org/wiki/Software/systemd/json
270
271
272
273systemd 243                                          SYSTEMD.JOURNAL-FIELDS(7)
Impressum