help with selector not working

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

help with selector not working

Postby rb1980 » Wed Oct 29, 2008 2:54 am

OK, this has to be super easy, but I am just not seeing it:

Why doesn't this selector work right?
*.*;local2.warning;local3,local4,local5.none |/var/log/syslog;debug

To me, this should mean:
log everything, but only warning and above on local2, and nothing from local3,4,5
What I don't get is: the local3,4,5.none part is working, but I am still getting local2.notice messages:
local2.notice<149>: <149>cfengine:fms01[27156]: Cannot access file/directory /conf/foo.conf

here is the test1 template (made for debug)
$template debug,"%PRI-text%: %rawmsg%\n"

What am I doing wrong here? I know there's probably a more complex way, but I was hoping to keep it simple with just a selector line.
rb1980
New
 
Posts: 6
Joined: Thu Oct 23, 2008 6:44 pm

Professional Services Information

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

Re: help with selector not working

Postby prakash.akumalla » Wed Oct 29, 2008 5:46 am

What actually are local2,3,4,5 are here.
If you want to get only logs that are warninig and more, I suggest you to use their priority and facility in place of *.*

Prakash.
prakash.akumalla
Frequent Poster
 
Posts: 103
Joined: Thu Jun 26, 2008 2:37 pm

Re: help with selector not working

Postby rb1980 » Wed Oct 29, 2008 8:10 pm

prakash.akumalla wrote:What actually are local2,3,4,5 are here.
If you want to get only logs that are warninig and more, I suggest you to use their priority and facility in place of *.*

Prakash.

Sorry, I don't really understand your answer. Perhaps you misunderstood what I am trying to do:
I thought the local2.warning would "override" the *.* and exclude everything below warning on local2. This is clearly not working as I thought.

"Multiple selectors may be specified for a single action using the semicolon (";'') separator. Remember that each selector in the selector field is capable to overwrite the preceding ones. Using this behavior you can exclude some priorities from the pattern."
rb1980
New
 
Posts: 6
Joined: Thu Oct 23, 2008 6:44 pm

Re: help with selector not working

Postby prakash.akumalla » Thu Oct 30, 2008 8:08 am

Hi,

What I mean to say is that for every type of the log message there will be certain priority and facility. yo can just know the priority of a warning message and use that in place of *.* For the values of priority and facility refer the documentation.

Regards,
Prakash.
prakash.akumalla
Frequent Poster
 
Posts: 103
Joined: Thu Jun 26, 2008 2:37 pm

Re: help with selector not working

Postby trefalgar » Fri Oct 31, 2008 8:56 pm

What about ...

*.*,local2.warning,local3.none,local4.none,local5.none -/var/log/syslog;debug
trefalgar
Advanced
 
Posts: 42
Joined: Mon Sep 15, 2008 10:42 pm

Re: help with selector not working

Postby rb1980 » Sat Nov 01, 2008 12:17 am

no, i dont think so, dude. that syntax is all wrong.

Oddly, this seems to work:
local2.warning |/var/log/syslog;debug
*.*;local2,local3,local4,local5.none |/var/log/syslog;debug

which makes sense, but but i'm still scratching my head wondering why this selector doesn't:
*.*;local2.warning;local3,local4,local5.none |/var/log/syslog;debug
by all logic it should.
rb1980
New
 
Posts: 6
Joined: Thu Oct 23, 2008 6:44 pm

Google Ads



Return to Configuration

Who is online

Users browsing this forum: No registered users and 1 guest

cron