How to customize rsyslog messages with metadata extracted from systemd-journald

Solution Verified - Updated -


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


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

Current Customers and Partners

Log in for full access

Log In

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.