Cacti: PowerDNS Recursor Templates

Here are a couple of graph templates for the PowerDNS recursor. They need a shell script to be installed on the DNS server, and an net-snmp config change.

Add the following to the snmpd.conf

extend pdns-rec /usr/local/bin/

Put pdns_stats in /usr/local/bin, so that snmpd can find it (rename from pdns_stats.txt). Make it executable.

Then import the templates.

You end up with two graphs – one showing queries/sec + cache efficiency, and another one showing "exceptions" – slow queries, resource limits hit, spoof detection, etc.

You can use the existing templates with the new script, but the new version also allows you to use a couple more templates, which I've attached below. These are 'Performance' which shows the proportion of queries answered in particular time bands, and 'Concurrency' which shows the number of threads running.


Download the Template Files

Testing your SNMP

CacheX:/# snmpwalk -v2c -c public .

It should show something like below-

# snmpwalk -v 2c -c hxxx x.x.x.2 .
NET-SNMP-EXTEND-MIB::nsExtendOutLine."pdns-rec".1 = STRING: 343281636
NET-SNMP-EXTEND-MIB::nsExtendOutLine."pdns-rec".2 = STRING: 607474
NET-SNMP-EXTEND-MIB::nsExtendOutLine."pdns-rec".3 = STRING: 273813367
NET-SNMP-EXTEND-MIB::nsExtendOutLine."pdns-rec".4 = STRING: 69468041
NET-SNMP-EXTEND-MIB::nsExtendOutLine."pdns-rec".5 = STRING: 3
NET-SNMP-EXTEND-MIB::nsExtendOutLine."pdns-rec".6 = STRING: 0
NET-SNMP-EXTEND-MIB::nsExtendOutLine."pdns-rec".7 = STRING: 25058
NET-SNMP-EXTEND-MIB::nsExtendOutLine."pdns-rec".8 = STRING: 594372
NET-SNMP-EXTEND-MIB::nsExtendOutLine."pdns-rec".9 = STRING: 0
NET-SNMP-EXTEND-MIB::nsExtendOutLine."pdns-rec".10 = STRING: 3840759
NET-SNMP-EXTEND-MIB::nsExtendOutLine."pdns-rec".11 = STRING: 215
NET-SNMP-EXTEND-MIB::nsExtendOutLine."pdns-rec".12 = STRING: 274167247
NET-SNMP-EXTEND-MIB::nsExtendOutLine."pdns-rec".13 = STRING: 7213261
NET-SNMP-EXTEND-MIB::nsExtendOutLine."pdns-rec".14 = STRING: 37616542
NET-SNMP-EXTEND-MIB::nsExtendOutLine."pdns-rec".15 = STRING: 20443599
NET-SNMP-EXTEND-MIB::nsExtendOutLine."pdns-rec".16 = STRING: 9702



Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.