Setup a Debian Syslog Server with LogAnalyzer (Adiscon)

DRAFT !

 

The purpose of this “how to” is the setup of a Syslog Server with LogAnalyzer (http://loganalyzer.adiscon.com/) running on Debian 6.

  1. Setup rsyslog DebianRsyslog is the standard Syslog Daemon since Debian Lenny.
  1. Configure Rsyslog as Syslog ServerIn /etc/rsyslog.conf  uncomment the following lines for activating the Syslog Servers.
    # provides UDP syslog reception
    $ModLoad imudp
    $UDPServerRun 514
    
    # provides TCP syslog reception
    $ModLoad imtcp
    $InputTCPServerRun 514
  2. Create a Logfile for each Syslog ClientIf you like to have for each client a dedictated logfile add the following lines to your /etc/rsyslog.conf :
    # Logfile for each host
    $template DynaFile,"/var/log/syslog-%HOSTNAME%.log"
    *.* -?DynaFile
  3. Rotate the new LogfilesThe dedicated Logfiles need be included in the logrotate process. Create a new file :
    /etc/logrotate.d/rsyslog-newlogsand add the following lines :
     

    /var/log/syslog-*.log
    {
            rotate 7
            daily
            missingok
            notifempty
            delaycompress
            compress
            postrotate
                    invoke-rc.d rsyslog reload > /dev/null
            endscript
    }