How to customize rsyslog messages with metadata extracted from systemd-journald
Issue
-
I want to add systemd-journald fields, e.g.
_MACHINE_ID
to messages in/var/log/messages
- standard
/var/log/messages
Nov 14 16:40:28 mysystem systemd-logind: New session 3 of user root.
- new
/var/log/messages
with_MACHINE_ID
field between > and <
Nov 14 16:41:18 mysystem >1de921fc75524ff0bb4386b99ca4a3ff< systemd-logind: Starting Session 4 of user root.
- standard
Environment
- Red Hat Enterprise Linux (RHEL) 7 and later
- rsyslog
- systemd-journald
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.