logmngr: only apply lua filter to /dev/log and kmsg input

(cherry picked from commit aed793ccdb)

Co-authored-by: Mohd Husaam Mehdi <husaam.mehdi@iopsys.eu>
This commit is contained in:
Vivek Dutta 2026-01-07 18:24:06 +05:30 committed by IOPSYS Dev
parent ab5cf60a19
commit a742abbdb5
No known key found for this signature in database

View file

@ -69,6 +69,17 @@ create_service_section() {
append_conf ""
}
create_lua_filter_for_severity_facility() {
match_regex="$1"
append_conf "[FILTER]"
append_conf " name lua"
append_conf " match_regex ${match_regex}"
append_conf " script /etc/fluent-bit/syslog_facility.lua"
append_conf " call map_facility_severity"
append_conf ""
}
create_default_filters() {
append_conf "[FILTER]"
append_conf " name modify"
@ -88,12 +99,6 @@ create_default_filters() {
append_conf " match *"
append_conf " hostname_key hostname"
append_conf ""
append_conf "[FILTER]"
append_conf " name lua"
append_conf " match *"
append_conf " script /etc/fluent-bit/syslog_facility.lua"
append_conf " call map_facility_severity"
}
create_input_section() {
@ -498,6 +503,8 @@ handle_action() {
# get the template expression if any is present
log_template="$(get_template_expression "$template_ref")"
create_lua_filter_for_severity_facility "$tag_regex"
# handle output, each action can be associated with an out_log and out_syslog
# section so figure out if any out_log or out_syslog section is associated
# with this and action and setup output accordingly.