PowerDNS Recursor Templates [updated 29/7/09]

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

PowerDNS Recursor Templates [updated 29/7/09]

Post by Howie »

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

Code: Select all

extend pdns-rec /usr/local/bin/pdns_stats
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.

Update
I've uploaded a newer version of pdns_stats.txt which collects a few more statistics. 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.
Attachments
cacti_graph_template_powerdns_recursor_-_performance.xml
(39.32 KiB) Downloaded 1168 times
cacti_graph_template_powerdns_recursor_-_concurrency.xml
(12.25 KiB) Downloaded 1542 times
cacti_graph_template_powerdns_recursor_-_statistics.xml
(23.44 KiB) Downloaded 1207 times
cacti_graph_template_powerdns_recursor_-_exceptions.xml
(34.75 KiB) Downloaded 1234 times
pdns_stats.txt
(274 Bytes) Downloaded 1989 times
Last edited by Howie on Wed Jul 29, 2009 4:41 am, edited 2 times in total.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

Some images from my testing.

Edit: Added the two new templates.
Attachments
pdns-concurrency.png
pdns-concurrency.png (27.69 KiB) Viewed 21901 times
pdns-except.png
pdns-except.png (27.7 KiB) Viewed 21901 times
pdns-performance.png
pdns-performance.png (30.13 KiB) Viewed 21901 times
pdns-stats.png
pdns-stats.png (23.6 KiB) Viewed 21901 times
Last edited by Howie on Wed Jul 29, 2009 4:40 am, edited 1 time in total.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
julian924s
Cacti User
Posts: 113
Joined: Thu Mar 13, 2008 3:36 am

Post by julian924s »

Sweet - any chance of some templates / scripts for the authoritative part of powerdns?

Thanks - J.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

julian924s wrote:Sweet - any chance of some templates / scripts for the authoritative part of powerdns?

Thanks - J.
I don't use that (yet). It'd be the same basic idea though, except with pdns_control instead of rec_control.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
xseries
Posts: 8
Joined: Mon Jul 27, 2009 11:52 am
Location: Netherlands

Post by xseries »

Maybe I'm wrong; but the statistics pulled from the recursor aren't reset so the lines are only going up ?
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

xseries wrote:Maybe I'm wrong; but the statistics pulled from the recursor aren't reset so the lines are only going up ?
You mean apart from the parts in the graph above that are clearly going down? :-)

No, the numbers from rec_control go up, but that's what the COUNTER type in Cacti/rrdtool is for.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
xseries
Posts: 8
Joined: Mon Jul 27, 2009 11:52 am
Location: Netherlands

Post by xseries »

Ah; ok; thanx !

But; before I can use it; i'll need to upgrade from 0.8.7b :-(
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

Yes, you will. I can't export from any other version that 0.8.7d, because that's what I am using...

Just added a couple more graph templates to the original post, too.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
xseries
Posts: 8
Joined: Mon Jul 27, 2009 11:52 am
Location: Netherlands

Post by xseries »

I;ve upgrade my cacti to most recent version; but there seems to be a problemen regarding snmpd :

ns0:/etc/snmp# snmpwalk -v2c -cpublic xxx.xxx.xxx.xxx pdns-rec
pdns-rec: Unknown Object Identifier (Sub-id not found: (top) -> pdns-rec)
ns0:/etc/snmp#

I've edited snmpd.conf and restarted it...
What's going wrong here ?
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

xseries wrote:I;ve upgrade my cacti to most recent version; but there seems to be a problemen regarding snmpd :

ns0:/etc/snmp# snmpwalk -v2c -cpublic xxx.xxx.xxx.xxx pdns-rec
pdns-rec: Unknown Object Identifier (Sub-id not found: (top) -> pdns-rec)
ns0:/etc/snmp#

I've edited snmpd.conf and restarted it...
What's going wrong here ?
That's not the OID. Try walking .1.3.6.1.4.1.8072.1.3.2.4.1.2
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
xseries
Posts: 8
Joined: Mon Jul 27, 2009 11:52 am
Location: Netherlands

Post by xseries »

@Howie
After a upgrade to the latest cacti; changing some rights on files and directories and some more troubleshooting it's working :-)

Thanks !
tomasz.wostal
Posts: 3
Joined: Fri Sep 11, 2009 1:16 pm
Location: Poland

Post by tomasz.wostal »

xseries wrote:@Howie
After a upgrade to the latest cacti; changing some rights on files and directories and some more troubleshooting it's working :-)

Thanks !
I have the same error. What have you done that worked?
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

tomasz.wostal wrote:
xseries wrote:@Howie
After a upgrade to the latest cacti; changing some rights on files and directories and some more troubleshooting it's working :-)

Thanks !
I have the same error. What have you done that worked?
The error xseries had was using the wrong OID as far as I can see... :-?
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
tomasz.wostal
Posts: 3
Joined: Fri Sep 11, 2009 1:16 pm
Location: Poland

Post by tomasz.wostal »

Howie wrote: The error xseries had was using the wrong OID as far as I can see... :-?
I was walking this OID .1.3.6.1.4.1.8072.1.3.2.4.1.2. I will check my configuration one again :)
Amosery
Posts: 1
Joined: Wed Sep 16, 2009 7:39 am

Script for authoritative part of powerdns

Post by Amosery »

Hello,

for the authoritative part of powerdns, you can't use pdns_control.
But, the Init-Script provide functionality for mrtg that you can use.

example: /etc/init.d/pdns mrtg udp-queries udp-answers

See pdns-Manual http://doc.powerdns.com/init-d-commands.html

And, sorry for my bad english :-)

Bye Amosery
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest