Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to add some performance monitoring for our DNS servers using the Appaloosa templates however it seems that the format of the statistics file created by bind9 ( with statistics-file "/var/log/named/stats.txt"; in the config ) is different on Ubuntu that what the Appaloosa script expects.

The start of ours looks like this:

+++ Statistics Dump +++ (1328102269)
++ Incoming Requests ++
           728403022 QUERY
++ Incoming Queries ++
           330347117 A
                  27 NS
              169974 SOA
             1548490 PTR
              350886 MX
                   4 TXT
           395986483 AAAA
                  37 IXFR
                   4 ANY
++ Outgoing Queries ++
[View: default]
             2182086 A
                 132 NS
             1592702 PTR
              552138 MX
                  10 TXT
             2220781 AAAA
                  11 ANY
[View: _bind]
[View: _meta]
++ Name Server Statistics ++
           728403022 IPv4 requests received
              170184 requests with EDNS(0) received
                  81 TCP requests received
           728311986 responses sent
                  45 truncated responses sent
              170184 responses with EDNS(0) sent
           334191069 queries resulted in successful answer
           721355404 queries resulted in authoritative answer
             6008840 queries resulted in non authoritative answer
                 534 queries resulted in referral answer
           213803787 queries resulted in nxrrset
              947742 queries resulted in SERVFAIL
           179368854 queries resulted in NXDOMAIN
             2263369 queries caused recursion
               90693 duplicate queries received
                 305 queries dropped
                  37 requested transfers completed

The normal stats file (as found in CentOS/Redhat and described by the docs) looks like this:

+++ Statistics Dump +++ (1300812291)
success 1843046927
referral 96446157
nxrrset 188937348
nxdomain 658140493
recursion 1158184815
failure 1373105359
--- Statistics Dump --- (1300812291)


  1. Is there a configuration option to change the statistics file format?
  2. Is there a script to parse the Debian/Ubuntu bind9 statistics file format into something more usable?
share|improve this question
is this the output of rndc stats or the content of the file? The first one should give you the output you want. – Lars Feb 13 '12 at 13:51
From memory, rndc stats didn't produce any output at all but caused the statistics file to be regenerated. The Appaloosa script uses rndc in this way. – Ladadadada Feb 14 '12 at 21:37
up vote 4 down vote accepted

It seems that the format for statistics changed somewhere between 9.3 (the docs you linked to) and 9.5. The docs on the ISC site for the current version describe a statistics file similar to the one you're getting from Ubuntu. There doesn't appear to be an option to use the older format.

A quick google doesn't turn up anything to convert between formats, but since they're both reasonably well documented it shouldn't be too difficult.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.