a)login to the ubuntu server as root or as a user with sudo privilege
b)install syslog server
#apt-get install syslogd
c)vi the file /etc/default/syslogd
modify the entry SYSLOGD=”” to SYSLOGD=”-r”
(This change is for allowing remote logging from remote devices)
d)restart the syslogd service
# /etc/init.d/sysklogd stop
# /etc/init.d/sysklogd start
verify the syslogd service is running the command
#netsstat -na | grep 514
A similar output is expected
root@netmon01:~# netstat -na | grep 514
udp 119448 0 0.0.0.0:514 0.0.0.0:*
e)Now vi the file /etc/syslog.conf
create entries like this
local5.debug /var/log/local5
local6.debug /var/log/local6
local7.debug /var/log/local7
# logging trap informational
# logging facility local6
#logging SERVERIP# loggin on
Steps to confgure a Cisco ASA
logging enable
logging timestamp
logging monitor informational
logging trap informational
Similarly you can configure loadbalancer’s or other devices to send the logs to another facility on Syslog server say local5
/var/log/tac-plus/*.log {
monthly
missingok
compress
notifempty
postrotate
/etc/init.d/tac_plus stop >/dev/null
/etc/init.d/tac_plus start >/dev/null
endscript
}
Add the following content to log rotate tacplussyslog
——————————————————————————————-
/var/log/tac_plus.log {
weekly
missingok
compress
notifempty
postrotate
/etc/init.d/tac_plus stop >/dev/null
/etc/init.d/tac_plus start >/dev/null
endscript
}
——————————————————————————————-
Instead of monthly you can use daily,weekly,hourly etc.For log rotating other files just create a file and add appropriate script to the file
Please note that ubuntu has its own log archival for local6 which will be done by the OS itself.(syslogd-listfiles command will give you the information)But still you can make changes to the syslogd script to make changes to the archival frequency
Please reach me out @ bejoybkn@yahoo.com/bejoy.bnair@gmail.com
I can help you out with your doubts or questions
Thanks for taking the time to write this up. It was helpful
LikeLike