Powered by Blogger.

rsyslog: Enabling remote logging service in Ubuntu

Newer versions of Ubuntu (since 9.10 according to rsyslog wiki: http://wiki.rsyslog.com/index.php/Ubuntu) comes with rsyslog instead of sysklogd. Was trying to enable it via the sysklogd way by adding the "-r" option in the startup script. That obviously didn't work :)

What you'll need to do is just uncomment 2 lines in the /etc/rsyslog.conf file:

# provides UDP syslog reception
$ModLoad imudp
$UDPServerRun 514That's if you want to provide UDP syslog service. Uncomment the following 2 lines if you want to provide TCP syslog service:

# provides TCP syslog reception
$ModLoad imtcp
$InputTCPServerRun 514Once you've made the changes, either reload or restart the rsyslogd service:

myhost:/etc# /etc/init.d/rsyslog reload
Reloading enhanced syslogd: rsyslogd.I've chose to enable UDP for my server. We'll use netstat to check if rsyslogd is listening to the specified port:

myhost:/etc# netstat -tlnup | grep 514
udp 0 0 0.0.0.0:514 0.0.0.0:* 13282/rsyslogd
udp6 0 0 :::514 :::* 13282/rsyslogdrsyslogd is indeed listening to the proper port and protocol. 

Next stop, actual logging and probably more configuration :)
    Blogger Comment
    Facebook Comment