[Pdns-users] PowerDNS Monitoring and gathering Statistics

Brad Dameron Brad.Dameron at clearwire.com
Thu Nov 25 18:55:53 UTC 2010


We use Zenoss open source version. Then on the server I created a snmpd.local.conf file that has the following:

exec all-outqueries      /opt/snmp-scripts/recursor_stats all-outqueries
exec cache-entries       /opt/snmp-scripts/recursor_stats cache-entries
exec cache-hits          /opt/snmp-scripts/recursor_stats cache-hits

etc, etc.

The recursor_stats script is used for older version that are not fully multithreaded. Here is what it looks like:

#!/bin/sh
#Pull pdns_recursor stats for use via Zenoss
#On the servers running pdns_recursor, we have four processes running, two for each
#interface
PIDFILEONE=/var/run/recursor1/pdns_recursor.pid
PIDFILETWO=/var/run/recursor2/pdns_recursor.pid
RUNNINGCOUNT=0
if [ -e $PIDFILEONE ]; then
        for PID in `cat $PIDFILEONE`; do
                PDNSCOUNTONE=`/usr/bin/rec_control --socket-dir=/var/run/recursor1/ --socket-pid=$PID get $1`
                RUNNINGCOUNT=$(( $PDNSCOUNTONE+$RUNNINGCOUNT ))
        done
fi
if [ -e $PDFILETWO ]; then
        for PID in `cat $PIDFILETWO`; do
                PDNSCOUNTTWO=`/usr/bin/rec_control --socket-dir=/var/run/recursor2/ --socket-pid=$PID get $1`
                RUNNINGCOUNT=$(( $PDNSCOUNTTWO+$RUNNINGCOUNT ))
        done
fi
echo $RUNNINGCOUNT


We run 2 daemons each with set with --fork so we have to do a count of all the daemons.

Then in Zenoss we use the OID of 1.3.6.1.4.1.2021.8.1.101.1, 1.3.6.1.4.1.2021.8.1.101.2, 1.3.6.1.4.1.2021.8.1.101.3 to pull these.

Brad



> -----Original Message-----
> From: pdns-users-bounces at mailman.powerdns.com [mailto:pdns-users-
> bounces at mailman.powerdns.com] On Behalf Of gaurav chaturvedi
> Sent: Thursday, November 25, 2010 4:27 AM
> To: pdns-users at mailman.powerdns.com
> Subject: [Pdns-users] PowerDNS Monitoring and gathering Statistics
> 
> Hey,
> 
>    I am running few PowerDNS Authoritative servers, and I was
> wondering how do you keep an eye on performance of your dns servers.
> 
> Google gave me some solutions, but nothing satisfactory. I have been
> testing  DSC ( DNS Stats Collector ) , dnsmezzo and dns2db.
> DSC is a real pain to configure and get going.
> dnsmezzo is totally undocumented
> and dns2db is very heavy on the server. (The collector itself has been
> the cause of 80% iowait on the server)
> 
>   Currently I am using cacti + RRD + mrtg for a few graphs
> (http://forums.cacti.net/about37716.html) . But I am looking for
> something better.
> 
> Looking forward to some feeback.
> 
> Gaurav Chaturvedi
> _______________________________________________
> Pdns-users mailing list
> Pdns-users at mailman.powerdns.com
> http://mailman.powerdns.com/mailman/listinfo/pdns-users


This email may contain confidential and privileged material for the sole use of the intended recipient. Any review, use, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender by reply email and delete all copies of this message.





More information about the Pdns-users mailing list