Fix syslog-ng filter: match on MESSAGE not program()
All checks were successful
CI / test (push) Successful in 1m29s
All checks were successful
CI / test (push) Successful in 1m29s
With flags(no-parse) on the source, syslog-ng doesn't extract
the program name. Use match("btest-rs:" value("MESSAGE")) instead.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -3,22 +3,25 @@
|
|||||||
#
|
#
|
||||||
# Copy to: /var/data/syslogng/config/conf.d/btest.conf
|
# Copy to: /var/data/syslogng/config/conf.d/btest.conf
|
||||||
# Or append to your main syslog-ng.conf
|
# Or append to your main syslog-ng.conf
|
||||||
|
#
|
||||||
|
# Note: uses message-based matching (not program()) because
|
||||||
|
# MikroTik sources use flags(no-parse) which skips program extraction.
|
||||||
|
|
||||||
# Filter for btest-rs messages
|
# Filter for btest-rs messages
|
||||||
filter f_btest {
|
filter f_btest {
|
||||||
program("btest-rs");
|
match("btest-rs:" value("MESSAGE"));
|
||||||
};
|
};
|
||||||
|
|
||||||
# Filter subcategories
|
# Filter subcategories
|
||||||
filter f_btest_auth {
|
filter f_btest_auth {
|
||||||
program("btest-rs") and (
|
match("btest-rs:" value("MESSAGE")) and (
|
||||||
match("AUTH_SUCCESS" value("MESSAGE")) or
|
match("AUTH_SUCCESS" value("MESSAGE")) or
|
||||||
match("AUTH_FAILURE" value("MESSAGE"))
|
match("AUTH_FAILURE" value("MESSAGE"))
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
filter f_btest_test {
|
filter f_btest_test {
|
||||||
program("btest-rs") and (
|
match("btest-rs:" value("MESSAGE")) and (
|
||||||
match("TEST_START" value("MESSAGE")) or
|
match("TEST_START" value("MESSAGE")) or
|
||||||
match("TEST_END" value("MESSAGE")) or
|
match("TEST_END" value("MESSAGE")) or
|
||||||
match("TEST_RESULT" value("MESSAGE"))
|
match("TEST_RESULT" value("MESSAGE"))
|
||||||
|
|||||||
Reference in New Issue
Block a user