On 08/20/2012 12:53 AM, Heinz Diehl wrote:
On 19.08.2012, Bob Goodwin - Zuni, Virginia, USA wrote:
Can someone tell me the proper command to save log data to " /home/bobg/xxlog" instead of filling up "var/log/messages" nothing I've tried has worked?
Here's what works for me:
- Go to /etc/sysconfig/rsyslog and add the "-r" option to the
parameters for rsyslogd (as far as I know, the "-r" option has been obsoleted some time ago, and is replaced by 2., so just try or read the manpages).
- Go to /etc/rsyslogd.conf and let the daemon listen on UDP port 514:
$ModLoad imudp $UDPServerRun 514
- Go to /etc/rsyslog.d and create an empty file. Write this into it:
:source, isequal, "sunshine" /var/log/tomato.log :source, isequal, "sunshine" ~
Replace "sunshine" with your routers name, or use its IP.
- Restart rsyslogd:
systemctl restart syslog.service
That's it.
And don't forget to open port 514 if you are running a firewall on the rsyslog host. It is closed by default.