mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2026-02-21 20:03:09 +01:00
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:
parent
ab5cf60a19
commit
a742abbdb5
1 changed files with 13 additions and 6 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue