08
Kwi
10

rsyslog captures wrt54gl tomato’s logs

1. Edit the /etc/rsyslogd.conf file for allowing the rsyslog server to accept logs from UDP (port 514), by uncommenting the following lines:

# provides UDP syslog reception
$ModLoad imudp
$UDPServerRun 514

By default, rsyslogd will treat the remote logs as if they were local ones (meaning, among other things, the entries will end up in the same logfiles where the local logs are stored). In my setup, I found convenient to override that behaviour and instead place all the logs from my router in a different file:

2. (Optional) Create the file /etc/rsyslogd.d/openwrt.conf with the following contents:

:source, isequal, "myrouter.mydomain" /var/log/mylogfile.log
:source, isequal, "myrouter.mydomain" ~

The first line logs the entries coming from „myrouter.mydomain” (can be expressed as an IP as well) into /varlog/mylogfile.log, while the second one prevents any further processing of the entry by discarding it (note the final tilde ~). A more complete description of the different configuration options [1] and example configurations [2] can be found on the rsyslogd man pages and wiki.

Hope it helps someone.

[1] http://www.rsyslog.com/doc-rsyslog_conf.html
[2] http://wiki.rsyslog.com/index.php/Configuration_Samples

This tutorial was wrote by diego.mics on openwrt forum
Advertisements

3 Responses to “rsyslog captures wrt54gl tomato’s logs”


  1. 1 pablo
    Marzec 16, 2011 o 6:06 pm

    It most certainly helped me. Thanks!

  2. Wrzesień 9, 2012 o 7:58 pm

    Your style is very unique compared to other
    folks I have read stuff from. Many thanks for posting when you’ve got the opportunity, Guess I will just bookmark this page.

  3. Listopad 16, 2012 o 1:02 pm

    Greetings,
    I really like your opinions… Quality job on the page design.
    .
    Cheers


Skomentuj

Wprowadź swoje dane lub kliknij jedną z tych ikon, aby się zalogować:

Logo WordPress.com

Komentujesz korzystając z konta WordPress.com. Log Out / Zmień )

Zdjęcie z Twittera

Komentujesz korzystając z konta Twitter. Log Out / Zmień )

Facebook photo

Komentujesz korzystając z konta Facebook. Log Out / Zmień )

Google+ photo

Komentujesz korzystając z konta Google+. Log Out / Zmień )

Connecting to %s


Google Adsense

kalendarz

Kwiecień 2010
Pon T Śr T Pt S S
« Sty   Maj »
 1234
567891011
12131415161718
19202122232425
2627282930  

%d bloggers like this: