Tracking DNS queries in PowerDNS

powerdns

I'm looking into setting up a PowerDNS server to handle a few hundred zones. I'd like to keep track the "usage" of each zone and record, i.e. the number of queries per day to each.

I couldn't find any details in the documentation or in Google on how I might achieve this. I'm unfamiliar with PowerDNS, but thinking a custom PipeBackend is needed? Do PipeBackends replace a standard MySQL backend, in addition to, or only for unresolved queries?

Best Answer

PowerDNS cannot currently do this. There are external tools, like dsc that can do stats via pcap.

If you were to write a custom (pipe)backend for this, it would have to replace your mysql-backend -- you can't tell powerdns to feed results from one backend through another. 'pipebackend' is perhaps a bit confusing in that sense.

Note that any statistics you would do from a backend (be it a custom backend, or be it your mysql query log) would be skewed by the (optional, but recommended) packet- and query-cache inside PowerDNS.

So, right now I would recommend using something like dsc.

Related Topic