Raspbian comes with rsyslogd installed.
So it's a case of configuring it for remote syslogging from your router/switch
http://www.rsyslog.com/guides/ is the home page for the docs.
http://www.rsyslog.com/receiving-messag ... te-system/ looks like what you want to do and the arcane incantations you'll need to add to /etc/rsyslog.conf to get it listening to port 514.
I updated these lines in /etc/rsyslog.conf
Code: Select all
# provides UDP syslog reception
$ModLoad imudp
$UDPServerRun 514
# provides TCP syslog reception
$ModLoad imtcp
$InputTCPServerRun 514
Once it's listening you can test it with telnet.
Code: Select all
telnet localhost 514
hello logger log this
warn:log this as warn
>>>> then press CTRL+] followed by quit to exit from telnet
And this turned up in the bottom of /var/log/messages
Code: Select all
Dec 21 17:43:30 pi rsyslogd: [origin software="rsyslogd" swVersion="7.4.4" x-pid="4771" x-info="http://www.rsyslog.com"] start
Dec 21 17:44:03 hello logger log this#015
Dec 21 17:44:20 localhost warn: log this as warn#015
You may need to look more deeply at what your router sends, you may be able to create a log just for the router.