LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 01-15-2011, 08:44 AM   #1
razzera
Member
 
Registered: Dec 2009
Posts: 105

Rep: Reputation: 15
Filter syslog


Hello

I wonder how i can filter the syslog ? ie there is a message that i dont want to se logged in there etc?
 
Old 01-15-2011, 09:48 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
This depends on the syslog service you're using. I personally prefer syslog-ng which has various ways to do this which you can read about in it's standard documentation. More standard older syslog daemons don't really permit this, although rsyslog is very similar in terms of config to the normal syslog.conf but does provide more options.
 
Old 01-17-2011, 04:14 PM   #3
razzera
Member
 
Registered: Dec 2009
Posts: 105

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by acid_kewpie View Post
This depends on the syslog service you're using. I personally prefer syslog-ng which has various ways to do this which you can read about in it's standard documentation. More standard older syslog daemons don't really permit this, although rsyslog is very similar in terms of config to the normal syslog.conf but does provide more options.
i was loooking trough it and i dont quite understand. Can you give me an example in syslog-ng of how i filter(so it wont get logged) anyting that has a certain word/phrase in it ?
 
Old 01-17-2011, 04:43 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Here's an example for rsyslog:
Code:
:msg, contains, "Will not restore" ~
which blocks out certain 'restorecond' messages. As you can see it's just a basic string match.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to filter in syslog output LinuxLover Solaris / OpenSolaris 1 05-17-2010 01:12 PM
How to filter PA/module-alsa-sink.c messages from syslog sixerjman Linux - Software 2 05-05-2009 09:06 AM
Dansguardian - Won't filter new addresses added to filter list TechnoBod Linux - Software 1 01-08-2008 01:40 AM
LXer: Centralized Syslog Server Using syslog-NG LXer Syndicated Linux News 0 04-28-2006 06:21 PM
Spam filter to external mail filter deadlock Linux - Software 1 06-16-2004 02:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 09:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration