Coming Underground
« NFS access restrictions on the PCH A-110 NMTGoogle Android troubles »

Supressing repeating log messages with Syslog-ng

Permalink 2009-10-21 19:57, by jaervosz, Categories: General, Gentoo Tips, Gentoo, Universe/English, Opensource

Again today I was hit by Stunnel's excessive logging behaviour, causing my log files to grow rapidly with messages like:

stunnel: warning: can't get client address: Bad file descriptor

Which is caused by my Wifi going offline, I fail to see why Stunnel should log hundreds of lines each second if the network is unavailable....

In my five minute search I couldn't really see how I could get Stunnel to change logging behaviour, without disable logging alltogether.

However I finally figured out how to suppress repeat messages with Syslog-ng, like Metalog did back in the old days when I used that. Stunnel from 2.1.1 and up has a suppress(X) option that is not documented very good. With the suppress option Syslog-ng will apparently suppress repeat messages in X second intervals. You can use it simply like this:

destination messages { file("/var/log/messages" suppress(30)); };

So with a bit of luck I should not be hit by Stunnel logging again.

2 comments »Send a trackback »

Trackback address for this post

This is a captcha-picture. It is used to prevent mass-access by robots.
Please enter the characters from the image above. (case insensitive)

2 comments

"has a suppress(X) option that is not documented very good."
Hmmm... you are entirely right on that, the descriptions of options that are discussed only in the reference section is not too detailed. I'll think about how to improve them.

Regards,
Robert
maintainer of the syslog-ng Administrator Guide
2009-10-22 @ 10:07
Comment from: jaervosz [Member] Email
@Robert: that would be absolutely great:)
2009-10-22 @ 12:09

Leave a comment


Your email address will not be revealed on this site.

Your URL will be displayed.
(Line breaks become <br />)
(Name, email & website)
(Allow users to contact you through a message form (your email will not be revealed.)
This is a captcha-picture. It is used to prevent mass-access by robots.
Please enter the characters from the image above. (case insensitive)

©2010 by admin

Contact Jaervosz