Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a cluster of Linux servers that are fronted by a load-balancer, which probes each server every 5 seconds to determine if it's operational. These probes generate a lot of useless noise in the logs, and I'd like to simply not have them logged...

Is there a way to prevent rsyslog from logging specific events?

share|improve this question

3 Answers 3

up vote 8 down vote accepted

Check out the rsyslog filter documentation. Here is an example from the docs on how to filter a message. The filter would need to be place in the configuration file before the section that defines the log where the annoying message is being delivered too.

:msg, contains, "informational"  ~

All messages containing the string "informational" are discarded.

share|improve this answer

It might be easier to configure those specific entries to go to some other file that is either rotated more often, or maybe even (if you really don't care about the output), /dev/null

If you can't use normal syslog facility filtering, try checking the expression-based filters: http://www.rsyslog.com/doc-rsyslog_conf_filter.html

share|improve this answer

Also consider taking a look at swatch, which let's you customize, colorize and filter log viewing.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.