I am trying to filter the systemd
logs using fluentbit with different log levels. The requirement is to exclude the log-level 7
for certain services while excluding log-level 4-7
for another service. My config currently looks like :
filter-systemd.conf: |
[FILTER]
Name modify
Match systemd.*
Rename _SYSTEMD_UNIT systemd_unit
Rename _HOSTNAME hostname
[FILTER]
Name grep
Match systemd.*
regex SYSLOG_IDENTIFIER kubelet|sshd|sudo|systemd-logind
Exclude PRIORITY ^[7]$
[FILTER]
Name grep
Match systemd.*
regex SYSLOG_IDENTIFIER containerd
Exclude PRIORITY ^[4567]$
[FILTER]
Name record_modifier
Match systemd.*
Remove_Key _CURSOR
Remove_Key _REALTIME_TIMESTAMP
Remove_Key _MONOTONIC_TIMESTAMP
Remove_Key _BOOT_ID
Remove_Key _MACHINE_ID
However, currently there are no containerd
logs being pushed using fluentbit. Even if I remove the Exclude PRIORITY ^[4567]$
line, it still doesn't push any containerd
logs. I am not able to setup different log levels for different systemd
services. Any help will be appreciated, thanks.