How to customize rsyslog messages with metadata extracted from systemd-journald
Issue
-
I want to add systemd-journald fields, e.g.
_MACHINE_IDto 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/messageswith_MACHINE_IDfield 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 of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
