Bind9 统计文件的不同可能格式

Bind9 统计文件的不同可能格式

我正在尝试使用阿帕卢萨马模板但是,似乎 bind9 创建的统计文件的格式(statistics-file "/var/log/named/stats.txt";在配置中)在 Ubuntu 上与 Appaloosa 脚本所期望的不同。

我们的开始是这样的:

+++ 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

常规统计文件(在 CentOS/Redhat 中可以找到,并由文档)如下所示:

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

问题:

  1. 是否有配置选项可以更改统计文件格式?
  2. 是否有一个脚本可以将 Debian/Ubuntu bind9 统计文件格式解析为更可用的格式?

答案1

统计格式似乎在 9.3(您链接到的文档)和 9.5 之间发生了变化。ISC 网站上当前版本的文档描述了一个与您从 Ubuntu 获得的统计文件类似的统计文件。似乎没有使用旧格式的选项。

快速谷歌搜索并没有找到任何可以在格式之间转换的内容,但由于它们都有相当完善的文档记录,所以应该不会太难。

相关内容