Ceci est une ancienne révision du document !
Installation sous Debian :
apt-get install syslog-ng
Editer le fichier de configuration syslog-ng
vim /etc/syslog-ng/syslog-ng.conf
Dans la partie « source » ajouter :
#
# If you wish to get logs from remote machine you will need this server
# to listen upon port 514.
#
source remote { tcp(port(514) keep-alive(no)); };
Dans la partie « destination » ajouter :
#
# Automatic host sorting
# Store all files beneath '/var/log/NAME OF MACHINE/facility
# Create these directories if required, with the given permissions.
#
destination hosts { file("/var/log/HOSTS/$HOST/$FACILITY" owner(root)
group(root) perm(0600) dir_perm(0700) create_dirs(yes)); };
Dans la partie « log » ajouter :
#
# log by host (as defined above) anything that's coming from the
# remote socket.
#
log { source(remote); destination(hosts); };
Recharger syslog-ng :
/etc/init.d/syslog-ng restart