victorialogs-datasource
victorialogs-datasource copied to clipboard
add support for configuring log level using custom rules
Summary
This pull request adds a "Log level rules" section to the datasource configuration screen. It allows users to define custom rules for dynamically assigning log levels based on field values.
Related issue: #294, #209, #201
How it works
Click "Add rule" to create a new rule. Each rule consists of the following elements:
- Enable switch – toggle to enable or disable the rule.
- Field name – the log field the rule applies to.
-
Operator – condition type:
Equals,Not equal,Matches regex,Less than,Greater than. - Value – the value to compare against.
-
Log level – level to assign if the rule matches:
critical,warning,error,info,debug,trace,unknown. - Delete button – removes the rule.
After adding or editing rules, make sure to click "Save & test" to apply the updated configuration.
Rule priority
If multiple rules match, the first one in the list takes precedence.