Logging, Syslog and Log Anaylsys Forums
July 30, 2010, 09:48:25 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
   Home   WIKI BLOG Help Search Recent Topics GoogleTagged Login Register  
Pages: [1]
  Print  
Author Topic: Filters by host or IP  (Read 477 times)
Kreno
Newbie
*
Offline Offline

Posts: 6


View Profile
« on: February 17, 2010, 06:23:59 am »

Hello all,

now that syslo-ng is working I would like to limit/redirect logs based on filters. I have created following filter and inserted it in log statement. Problem is that after I have added  the new code syslog-ng is no longer logging any messages. It does not matter if I input IP or hostname into the filter statement.

 
Code:
filter f_router { host("192.168.1.1") or host("192.168.10.1") or host("Cisco1712") or host("Cisco1812"); };

log { source(s_net);filter (f_router); destination(d_cisco_r);};

Is something wrong with config?

Thank you and kind regards, M
Logged
Admin
Administrator
Newbie
*****
Online Online

Posts: 146


View Profile WWW
« Reply #1 on: February 18, 2010, 11:00:07 am »

The host() filter only matches what comes across in the host field in the log message.  Try disabling the filter and look at the host field in the logs that are written, and use that to build your filter statement.
Logged
Kreno
Newbie
*
Offline Offline

Posts: 6


View Profile
« Reply #2 on: February 19, 2010, 08:51:07 am »

Thank you it works  Grin
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC | Sitemap Valid XHTML 1.0! Valid CSS!