Install Syslog Server - Ubuntu
# Install syslog-ng package
$ sudo apt install syslog-ng
$ sudo mkdir /var/log/syslog-ng
$ sudo cp /etc/syslog-ng/syslog-ng.conf /etc/syslog-ng/syslog-ng.log.bak
# Server configuration
$ sudo vi /etc/syslog-ng/syslog-ng.conf
@version: 3.5
@include "scl.conf"
@include "`scl-root`/system/tty10.conf"
options { chain_hostnames(off); flush_lines(0); use_dns(yes); use_fqdn(no);
owner("root"); group("adm"); perm(0640); stats_freq(0);
bad_hostname("^gconfd$");
# default 514/UDP
source s_local { udp(); };
destination d_local { file("/var/log/syslog-ng/messages_${HOST}"); };
log { source(s_local); destination(d_local); };
# Restart
sudo systemctl start syslog-ng
sudo systemctl enable syslog-ng
$ sudo apt install syslog-ng
$ sudo mkdir /var/log/syslog-ng
$ sudo cp /etc/syslog-ng/syslog-ng.conf /etc/syslog-ng/syslog-ng.log.bak
# Server configuration
$ sudo vi /etc/syslog-ng/syslog-ng.conf
@version: 3.5
@include "scl.conf"
@include "`scl-root`/system/tty10.conf"
options { chain_hostnames(off); flush_lines(0); use_dns(yes); use_fqdn(no);
owner("root"); group("adm"); perm(0640); stats_freq(0);
bad_hostname("^gconfd$");
# default 514/UDP
source s_local { udp(); };
destination d_local { file("/var/log/syslog-ng/messages_${HOST}"); };
log { source(s_local); destination(d_local); };
# Restart
sudo systemctl start syslog-ng
sudo systemctl enable syslog-ng
Comentários
Postar um comentário