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)
Questions:
- Is there a configuration option to change the statistics file format?
- Is there a script to parse the Debian/Ubuntu bind9 statistics file format into something more usable?
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.