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>
97 lines
2.1 KiB
Plaintext
97 lines
2.1 KiB
Plaintext
# btest-rs syslog configuration for syslog-ng
|
|
# Add this to your syslog-ng.conf or include from conf.d/
|
|
#
|
|
# Copy to: /var/data/syslogng/config/conf.d/btest.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 f_btest {
|
|
match("btest-rs:" value("MESSAGE"));
|
|
};
|
|
|
|
# Filter subcategories
|
|
filter f_btest_auth {
|
|
match("btest-rs:" value("MESSAGE")) and (
|
|
match("AUTH_SUCCESS" value("MESSAGE")) or
|
|
match("AUTH_FAILURE" value("MESSAGE"))
|
|
);
|
|
};
|
|
|
|
filter f_btest_test {
|
|
match("btest-rs:" value("MESSAGE")) and (
|
|
match("TEST_START" value("MESSAGE")) or
|
|
match("TEST_END" value("MESSAGE")) or
|
|
match("TEST_RESULT" value("MESSAGE"))
|
|
);
|
|
};
|
|
|
|
# All btest logs
|
|
destination d_btest_all {
|
|
file(
|
|
"/var/log/remote/btest/all.log"
|
|
create_dirs(yes)
|
|
dir_perm(0755)
|
|
perm(0644)
|
|
template(t_mikrotik_format)
|
|
);
|
|
};
|
|
|
|
# Auth events (successes + failures)
|
|
destination d_btest_auth {
|
|
file(
|
|
"/var/log/remote/btest/auth.log"
|
|
create_dirs(yes)
|
|
dir_perm(0755)
|
|
perm(0644)
|
|
template(t_mikrotik_format)
|
|
);
|
|
};
|
|
|
|
# Test events (start/stop/results)
|
|
destination d_btest_tests {
|
|
file(
|
|
"/var/log/remote/btest/tests.log"
|
|
create_dirs(yes)
|
|
dir_perm(0755)
|
|
perm(0644)
|
|
template(t_mikrotik_format)
|
|
);
|
|
};
|
|
|
|
# Per-day logs
|
|
destination d_btest_daily {
|
|
file(
|
|
"/var/log/remote/btest/${YEAR}-${MONTH}-${DAY}.log"
|
|
create_dirs(yes)
|
|
dir_perm(0755)
|
|
perm(0644)
|
|
template(t_mikrotik_format)
|
|
);
|
|
};
|
|
|
|
# Log paths
|
|
log {
|
|
source(s_network_udp);
|
|
source(s_network_tcp);
|
|
filter(f_btest);
|
|
destination(d_btest_all);
|
|
destination(d_btest_daily);
|
|
};
|
|
|
|
log {
|
|
source(s_network_udp);
|
|
source(s_network_tcp);
|
|
filter(f_btest_auth);
|
|
destination(d_btest_auth);
|
|
};
|
|
|
|
log {
|
|
source(s_network_udp);
|
|
source(s_network_tcp);
|
|
filter(f_btest_test);
|
|
destination(d_btest_tests);
|
|
};
|