Save rsyslog data -

Ed Greshko Ed.Greshko at greshko.com
Sun Aug 19 19:44:54 UTC 2012


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:
>
> 1. 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).
>
> 2. Go to /etc/rsyslogd.conf and let the daemon listen on UDP port 514:
>
> $ModLoad imudp
> $UDPServerRun 514
>
> 3. 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.
>
> 4. 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.

-- 
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -- Rick Cook, The Wizardry Compiled


More information about the users mailing list