fluent-bit: Add hostname field to all records

Messages from sources other than the systemd journal do not have a
`hostname` field by default.  This could make filtering logs difficult
if there are multiple servers that host the same application.  Thus, we
need to inject the host name statically into every record, to ensure
they can be correctly traced to their source machine.
This commit is contained in:
2025-09-15 08:00:16 -05:00
parent 414cb828e1
commit 3d4bf3dd6c

View File

@@ -143,6 +143,10 @@ dnf_automatic_schedule: >-
}} *-*-* 04:00:00 America/Chicago
fluent_bit_default_filters:
- name: record_modifier
match: '*'
record:
- hostname ${HOSTNAME}
# Avoid log amplification from logging the result of sending logs!
- name: grep
match: host.fluent-bit.service