I have some Samba-Domain-Controllers and one central Syslog-Server. All of them running the latest syslog-ng and SUSE Leap15. Every Log from Samba, Winbind and Bind/Named should go to the central Syslog-Server in a separate File. Until now, i realize that with one different port for every Logfile.
log.samba - Port 2000
log.winbind - Port 2001
log.named - Port 2002
With this way, i can separate the Logs for each Application and Server in an aggregateted Logfile on the central Server.
But, is there any possibilty to separate Logs from different Applications without use different Ports for each Application and Server?
Greetings Michael
Example on one DC:
source s_samba {file("/var/log/samba/log.samba" follow-freq(1));};
source s_winbind {file("/var/log/samba/log.wb-COLD-BEER" follow-freq(1));};
destination d_syslog-srv_samba {syslog("10.1.11.35" port(2000) transport ("tcp"));};
destination d_syslog-srv_winbind {syslog("10.1.11.35" port(2001) transport ("tcp"));};
log {source(s_samba);destination(d_syslog-srv_samba);};
log {source(s_winbind);destination(d_syslog-srv_winbind);};
On the central Syslog-Server:
source s_dc_all_network {syslog(port(2000) transport("tcp"));};
source s_winbind_all_network {syslog(port(2001) transport("tcp"));};
destination d_dc_all_local{file("var/log/syslog-srv/DC_all/log.samba_all"owner("root")group("root")perm(0777));};
destination d_winbind_all_local{file("var/log/syslog-srv/DC_all/log.wb-COLD-BEER_all"owner("root")group("root")perm(0777));};
log {source(s_dc_all_network);destination(d_dc_all_local);};
log {source(s_winbind_all_network);destination(d_winbind_all_local);};