rsyslog filter of router log input

This is the place for you, if you got rsyslog up and running but wonder how to make it do what you want.

Moderator: rgerhards

rsyslog filter of router log input

Postby gdr01 » Thu Jun 18, 2009 3:49 pm

I have spent hours if not days reading the how-to's and documents concerning rsyslog.conf and
I cannot for the life of me get a simple filter to work.

I have a router called 'walrus' that sends a log file to my system.
The data arrives and it all appears in the /var/log/messages file.
That was easy -- but I want it in its own log file ie /var/log/walrus.log.

this is one of the variations I have tried.

$template walrus, "%HOSTNAME=walrus::%, /var/log/walrus.log"
:msg, contains, "walrus" -/var/log/walrus.log

The above does not give an error in /var/log/messages when I restart
rsyslog but walrus.log is not created and the data keeps going to messages.

Can someone please point out where I am going wrong.
rsyslog version is swVersion="3.21.10" running on Fedora10
gdr01
New
 
Posts: 2
Joined: Thu Jun 18, 2009 3:35 pm

Professional Services Information

  • Custom written rsyslog.conf?
  • Maintenance Contract?
  • Installation support?

Re: rsyslog filter of router log input

Postby rgerhards » Thu Jun 18, 2009 3:52 pm

User avatar
rgerhards
Site Admin
 
Posts: 2647
Joined: Thu Feb 13, 2003 11:57 am

Re: rsyslog filter of router log input

Postby gdr01 » Tue Jun 23, 2009 9:56 am

Thanks
this worked as required :

fromhost-ip, isequal, "1.2.3.4" /var/log/Walrus.log
& ~

The 1.2.3.4 is the ip address of my router.

The line was placed ahead of the default rules in /etc/rsyslog.conf.
gdr01
New
 
Posts: 2
Joined: Thu Jun 18, 2009 3:35 pm

Re: rsyslog filter of router log input

Postby brianaxa » Wed Jun 24, 2009 12:23 pm

How do you hook up a router to the computer? What comes with a router? What is the difference between a wireless router and regular router?
brianaxa
New
 
Posts: 1
Joined: Tue Jun 23, 2009 10:58 am

Google Ads



Return to Configuration

Who is online

Users browsing this forum: No registered users and 0 guests

cron