diff --git a/manifests/server/conf.pp b/manifests/server/conf.pp index 7944be2ee..fc329c364 100644 --- a/manifests/server/conf.pp +++ b/manifests/server/conf.pp @@ -104,6 +104,9 @@ $forward = undef, $server_id = undef, $version = undef, + $statistics_address = '127.0.0.1', + $statistics_port = '8053', + $statistics_acls = [], $dump_file = '/var/named/data/cache_dump.db', $statistics_file = '/var/named/data/named_stats.txt', $memstatistics_file = '/var/named/data/named_mem_stats.txt', diff --git a/templates/named.conf.erb b/templates/named.conf.erb index 39cd72b8c..5f8579705 100644 --- a/templates/named.conf.erb +++ b/templates/named.conf.erb @@ -101,6 +101,16 @@ options { bindkeys-file "/etc/named.iscdlv.key"; }; +<% if !@statistics_acls.empty? -%> +statistics-channels { + inet <%= @statistics_address %> port <%= @statistics_port %> allow { +<% @statistics_acls.each do |line| -%> + <%= line %>; +<% end -%> + }; +}; +<% end -%> + logging { channel main_log { file "/var/log/named/named.log" versions 3 size 5m;