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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user