Hi, there.
Munin 1.2.6's default plugin "bind9_rndc" does not work in BIND9.5,
since "var/named.stats" format has changed so.
Following is new BIND9.5 "named.stats" output.
--- Statistics Dump --- (1222738621)
+++ Statistics Dump +++ (1222740363)
++ Incoming Requests ++
13 QUERY
++ Incoming Queries ++
9 A
1 NS
1 SOA
1 MX
1 TXT
++ Outgoing Queries ++
++ Name Server Statistics ++
13 IPv4 requests received
13 responses sent
13 queries resulted in successful answer
9 queries resulted in authoritative answer
4 queries resulted in non authoritative answer
4 queries caused recursion
++ Zone Maintenance Statistics ++
6 IPv4 notifies sent
I made a patch to fix it. It supports both classical BIND9.3 and BIND9.5.
--- ./build/node/node.d/bind9_rndc.orig 2008-09-30 13:12:12.000000000 +0900
+++ ./build/node/node.d/bind9_rndc 2008-09-30 13:18:14.000000000 +0900
@@ -41,6 +41,7 @@
open(my $stats, '<', $querystats) or die "$querystats: $!\n";
seek($stats , 400, -1); # go nearly to the end of the file
# to avoid reading it all
+my $mode = 0; # 0=Bind9.3, 1=Bind9.5
while (my $line = <$stats>) {
chomp $line;
@@ -58,6 +59,17 @@
if ($line =~ m/\+\+\+ Statistics Dump \+\+\+/) {
# reset
undef %IN;
+ } elsif ($line =~ m/\+\+ Name Server Statistics \+\+/) {
+ undef %IN;
+ $mode = 1;
+
+ } elsif( $mode == 1 ) {
+ my($i,$s) = $line =~ m/^\s+(\d+) (.*)/ or next;
+ $s =~ /(successful answer|(?:non )?authoritative answer|recursion)/ or next;
+ my $key = $1;
+ $key =~ s/ /_/g;
+ $IN{$key} = $i;
+
} else {
my ($what, $nb)= split('\s+', $line);
if ($what && ($what ne '---')) {
BIND9.5 plugin output sample.
query_recursion.value 7
query_authoritative_answer.value 37
query_successful_answer.value 43
query_non_authoritative_answer.value 8
I checked on BIND9.5.0-P2 and BIND9.3.4-P1.
Thanks.
K.Kano. <<kano@feena.jp>>