Linux – BIND zone statistics tracking

bindlinux

I am trying to get an accurate estimate of how many queries/{day,week,month} my DNS servers process for a specific subset of zones. I ran "rndc stats" and got a statistics file out of the deal, but it includes queries for ALL zones, and I need statistics for only a subset. I have the thought that this can be accomplished by adding "zone-statistics no" to the zone{ } part of the zone file, but I'm not confident to just try it and see what happens. Is this the correct procedure, or is there another way?

OS: OpenSuSE 11.2
BIND: 9.5

Thanks,

Kendall

Best Answer

zone-statistics is the way.

You either set it yes globally (in "options") and set no for non-interesting zones, or vice-versa - set no globally and yes for zones of interest.

--cut here--

Actually you have 3 ways to obtain statistics:

  1. rndc stats
  2. HTTP (statistics-channel)
  3. Queries log (will log ALL queries for ALL zones)

Obviously if what you need is just statistics, 1 and 2 are the right ways. To control them per-zone you use zone-statistics statement. Logging (3) can't be controlled per zone inside BIND.