Logging, Syslog and Log Anaylsys Forums
September 02, 2010, 05:48:29 pm
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
WIKI
BLOG
Help
Search
Recent Topics
GoogleTagged
Login
Register
Logging, Syslog and Log Anaylsys Forums
>
Forums
>
syslog-ng
>
Syslog-ng filter. How to log the exception?
Pages: [
1
]
« previous
next »
Print
Author
Topic: Syslog-ng filter. How to log the exception? (Read 2401 times)
webuser6479
Newbie
Offline
Posts: 2
Syslog-ng filter. How to log the exception?
«
on:
May 27, 2009, 11:30:38 am »
Team,
I would like to deploy the syslog-ng like below and not sure if that's possible.
1. Configure all network devices to send log to Host A that's running syslog-ng.
2. On Host A, apply a filter that matches certain strings in the log. If it matches, it forwards those events to Host B. Anything not forwarded(or say not matched to the filters) should be logged to a local log file for review later on.
What I was able to figure out is forwarding the logs with filter. However I can't figure out how to define a filter that covers what's not matched. I thought about using "not" in the filter and create another filter to inverse it. However if there is any neat trick, I would like to learn.
Thanks in advance,
Sam
Logged
mutex
Administrator
Newbie
Offline
Posts: 901
Re: Syslog-ng filter. How to log the exception?
«
Reply #1 on:
May 28, 2009, 08:30:42 pm »
I think you're looking for this:
filter f_test { not match("test"); };
Logged
webuser6479
Newbie
Offline
Posts: 2
Re: Syslog-ng filter. How to log the exception?
«
Reply #2 on:
May 28, 2009, 08:52:15 pm »
That's what I did. I was hoping there was a way to negate whole complex filter easily. I have multiple nested filters like this. I am showing you a smaller subset of my filters. I have roughly 11 individual filters called by main one.
filter f_pix {
filter(f_pix_5) and filter(f_pix_6);
};
filter f_pix_6 {
not match("(PIX|ASA)-6-(30501[12]|106100)|30201[3-6]|106015:");
};
filter f_pix_5 {
not match("(PIX|ASA)-5-304001:");
};
Logged
mutex
Administrator
Newbie
Offline
Posts: 901
Re: Syslog-ng filter. How to log the exception?
«
Reply #3 on:
May 28, 2009, 09:05:37 pm »
You could do something like this:
Code:
filter f_notpix {
not filter(f_pix);
};
filter f_pix {
filter(f_pix_5) and filter(f_pix_6);
};
filter f_pix_6 {
not match("(PIX|ASA)-6-(30501[12]|106100)|30201[3-6]|106015:");
};
filter f_pix_5 {
not match("(PIX|ASA)-5-304001:");
};
or am I missing something more?
Logged
Pages: [
1
]
Print
GoogleTagged:
syslog-ng filter
asa log syslog host
syslog-ng filter
syslog-ng filtering
syslog-ng filters
syslog-ng filter events
syslog-ng match filter
filtering syslog-ng with
syslog-ng filter
syslog nested match
not matched filter syslog-ng
howto syslog-ng filter not and
syslog-ng
asa syslog-ng conf
syslog asa filter
syslog-ng filter pix
syslog-ng filter describe
syslog-ng filter host
syslog-ng filter complex
syslog-ng invert filter
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Forums
-----------------------------
=> Syslog & syslogd
=> syslog-ng
=> Log Data and Analysis
=> Windows Event Log
=> Web Server Logs
=> Security Event Management
=> General Discussion
===> Red Light District
Loading...