1

I have setup a BIND DNS server and a munin monitoring system which is configured to monitor BIND as well. The OS is Ubuntu Server 12.04.4 and the BIND version coming with it is 9.8.1-P1.

Munin runs every 5 minutes, and executes the bind command rndc stats, which is spamming my bind log files with this message:

29-May-2014 01:30:04.070 general: info: received control channel command 'stats'
29-May-2014 01:30:04.073 general: info: dumpstats complete
29-May-2014 01:30:04.150 general: info: received control channel command 'stats'
29-May-2014 01:30:04.150 general: info: dumpstats complete
29-May-2014 01:35:03.112 general: info: received control channel command 'stats'
29-May-2014 01:35:03.112 general: info: dumpstats complete
29-May-2014 01:35:03.229 general: info: received control channel command 'stats'
29-May-2014 01:35:03.230 general: info: dumpstats complete
29-May-2014 01:40:03.183 general: info: received control channel command 'stats'
29-May-2014 01:40:03.185 general: info: dumpstats complete
29-May-2014 01:40:03.348 general: info: received control channel command 'stats'
29-May-2014 01:40:03.348 general: info: dumpstats complete

Is there any way to fine grain BIND logging and exclude ONLY this message?

Please note that I don't want to reduce the severity for general log messages, but only disable/exclude this specific message which is really flooding my log file.

Below is my current logging configuration:

logging {
        // reduce log verbosity on issues outside our control
        category lame-servers { null; };

        // Use "severity dynamic" for debugging
        channel b_default_log {
                file "/var/log/named/bind.log" versions 30 size 1m;
                print-time yes;
                print-category yes;
                print-severity yes;
                severity info;
        };

        channel b_resolver_log {
                file "/var/log/named/resolver.log" versions 5 size 1m;
                print-time yes;
                print-category yes;
                print-severity yes;
                severity dynamic;
        };

        channel b_config_log {
                file "/var/log/named/config.log" versions 5 size 1m;
                print-time yes;
                print-category yes;
                print-severity yes;
                severity dynamic;
        };

        channel b_edns_disabled_log {
                file "/var/log/named/edns_disabled.log" versions 5 size 1m;
                print-time yes;
                print-category yes;
                print-severity yes;
                severity dynamic;
        };

        // The query.log is needed for munin monitoring
        channel b_query_log {
                file "/var/log/named/query.log" versions 20 size 10m;
                print-time yes;
                severity info;
        };

        category default { b_default_log; };
        category resolver { b_resolver_log; };
        category config { b_config_log; };
        category queries { b_query_log; };
        category edns-disabled { b_edns_disabled_log; };
};

1 Answer 1

1

You could filter out the messages with your logging daemon.

For example, add this to /etc/rsyslog.conf

# Suppress certain Bind messages
:msg, contains, "received control channel command"  ~
:msg, contains, "dumpstats complete"                ~

The tilde (~) prevents the line from appearing in the log file.

1
  • It doesn't work in my case :( I added these lines in /etc/rsyslog.d/01-blocklist.conf. Does bind use rsyslog even when you redirect the logging in a different file than /var/log/syslog? Commented May 30, 2014 at 9:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .