| « NFS access restrictions on the PCH A-110 NMT | Google Android troubles » |
Supressing repeating log messages with Syslog-ng
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.
Trackback address for this post
2 comments
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