Ubuntu

Bind9 統計文件的不同可能格式

  • February 9, 2012

我正在嘗試使用Appaloosa 模板為我們的 DNS 伺服器添加一些性能監控,但是在 Ubuntu 上,bind9 創建的統計文件格式(配置中的 with )似乎與statistics-file "/var/log/named/stats.txt";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 中找到並由docs描述)如下所示:

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

問題:

  1. 是否有更改統計文件格式的配置選項?
  2. 是否有腳本可以將 Debian/Ubuntu bind9 統計文件格式解析為更有用的格式?

似乎統計數據的格式在 9.3(您連結到的文件)和 9.5 之間發生了變化。目前版本的 ISC 站點上的文件描述了一個類似於您從 Ubuntu 獲得的統計文件。似乎沒有使用舊格式的選項。

一個快速的Google並沒有發現任何格式之間的轉換,但由於它們都有合理的記錄,所以應該不會太難。

引用自:https://serverfault.com/questions/355798