All checks were successful
CI / test (push) Successful in 1m30s
- Syslog now uses RFC 3164 (BSD) format with proper timestamps and facility=local0 for easy filtering - Added deploy/syslog-ng-btest.conf with filters for: - All btest events (all.log + daily rotation) - Auth events only (auth.log) - Test events only (tests.log) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
94 lines
1.9 KiB
Plaintext
94 lines
1.9 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
|
|
|
|
# Filter for btest-rs messages
|
|
filter f_btest {
|
|
program("btest-rs");
|
|
};
|
|
|
|
# Filter subcategories
|
|
filter f_btest_auth {
|
|
program("btest-rs") and (
|
|
match("AUTH_SUCCESS" value("MESSAGE")) or
|
|
match("AUTH_FAILURE" value("MESSAGE"))
|
|
);
|
|
};
|
|
|
|
filter f_btest_test {
|
|
program("btest-rs") 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);
|
|
};
|