Β§2024-05-16
alexlai@hc4nas02:~$ ls /etc/syslog-ng/
conf.d patterndb.d scl.conf syslog-ng.conf syslog-ng.conf.backup
alexlai@hc4nas02:~$ syslog-ng --version
syslog-ng 3 (3.25.1)
Config version: 3.25 <-- put in @version
Installer-Version: 3.25.1
Revision: 3.25.1-3
Compile-Date: Mar 3 2020 19:39:43
....
....
@include 'scl/*/*.conf'
/etc/syslog-ng/
βββ syslog-ng.conf
βββ scl/
βββ sources/
β βββ my_sources.conf
βββ destinations/
β βββ my_destinations.conf
βββ filters/
βββ my_filters.conf
@version: 3.25 # not necessary but it it good to have it here
@include "scl.conf" # include configuration files in
# Set up the source
source s_net {
tcp(ip(0.0.0.0) port(514));
udp(ip(0.0.0.0) port(514));
};
# Set up the destination
destination d_file {
file("/var/log/syslog-ng/messages.log");
};
# Log everything from the source to the destination
log {
source(s_net);
destination(d_file);
};
Return to Top