Monitoring PowerDNS Recursor

This article will help you get the Powerdns_recursor plugin for sd-agent configured and returning metrics

Installing the powerdns_recursor plugin package

Install the powerdns_recursor plugin on Debian/Ubuntu:

sudo apt-get install sd-agent-powerdns-recursor

Install the powerdns_recursor plugin on RHEL/CentOS:

sudo yum install sd-agent-powerdns-recursor

Read more about agent plugins.

Configuring the agent to monitor powerdns recursor

The powerdns check collects metrics using the powerdns recursor statistics API. Version prior to 4.1 do not enable the statistics API by default. If you're running a version < 4.1 you'll need to enable the API by adding the following to your recursor config file (typically /etc/powerdns/recursor.conf).

1. Configure powerdns recursor:

webserver=yes
api-key=changeme            # only available since ver 4.0
webserver-readonly=yes      # default no
# webserver-port=8081       # default 8082
# webserver-address=0.0.0.0 # default 127.0.0.1

For users running version 3.x, experimental- needs to be prepended to these option names. For example experimental-webserver=yes

For users running version >=4.1, only the api-key option needs to be set.

2. Configure the check in /etc/sd-agent/conf.d/powerdns_recursor.yaml

init_config:

instances:
  - host: 127.0.0.1
    port: 8082
    api_key: secure_api_key
    version: 4 # omit this line if you're running pdns_recursor version 3.x

3. Restart the agent

sudo /etc/init.d/sd-agent restart

or

sudo systemctl restart sd-agent

Verifying the configuration
Execute info to verify the configuration with the following:

sudo /etc/init.d/sd-agent info 

or

/usr/share/python/sd-agent/agent.py info

If the agent has been configured correctly you'll see an output such as:

powerdns_recursor
-----
  - instance #0 [OK]
  - Collected * metrics

You can also view the metrics returned with the following command:

sudo -u sd-agent /usr/share/python/sd-agent/agent.py check powerdns-recursor

Configuring graphs

Click the name of your server from the Devices list in your Server Density account then go to the Metrics tab. Click the + Graph button on the right then choose the powerdns_recursor metrics to display the graphs. The metrics will also be available to select when building dashboard graphs.

Screen_Shot_2018-01-18_at_11.46.12.png

Monitored metrics

MetricValues
powerdns.recursor.all_outqueries

The number of outgoing udp queries per second
query / second
Type: float
powerdns.recursor.answers0_1

Number of queries per second answered within 1 millisecond
query / second
Type: float
powerdns.recursor.answers100_1000

Number of queries per second answered within 1 second
query / second
Type: float
powerdns.recursor.answers10_100

Number of queries per second answered within 100 milliseconds
query / second
Type: float
powerdns.recursor.answers1_10

Number of queries per second answered within 10 milliseconds
query / second
Type: float
powerdns.recursor.answers_slow

Number of queries per second NOT answered within 1 second
query / second
Type: float
powerdns.recursor.auth4_answers0_1

Number of queries per second answered by auth4s within 1 millisecond; Available since pdns_recursor v4.x
query / second
Type: float
powerdns.recursor.auth4_answers100_1000

Number of queries per second answered by auth4s within 1 second; Available since pdns_recursor v4.x
query / second
Type: float
powerdns.recursor.auth4_answers10_100

Number of queries per second answered by auth4s within 100 milliseconds; Available since pdns_recursor v4.x
query / second
Type: float
powerdns.recursor.auth4_answers1_10

Number of queries per second answered by auth4s within 10 milliseconds; Available since pdns_recursor v4.x
query / second
Type: float
powerdns.recursor.auth4_answers_slow

Number of queries per second NOT answered by auth4s within 1 second; Available since pdns_recursor v4.x
query / second
Type: float
powerdns.recursor.auth6_answers0_1

Number of queries per second answered by auth6s within 1 millisecond; Available since pdns_recursor v4.x
query / second
Type: float
powerdns.recursor.auth6_answers100_1000

Number of queries per second answered by auth6s within 1 second; Available since pdns_recursor v4.x
query / second
Type: float
powerdns.recursor.auth6_answers10_100

Number of queries per second answered by auth6s within 100 milliseconds; Available since pdns_recursor v4.x
query / second
Type: float
powerdns.recursor.auth6_answers1_10

Number of queries per second answered by auth6s within 10 milliseconds; Available since pdns_recursor v4.x
query / second
Type: float
powerdns.recursor.auth6_answers_slow

Number of queries per second NOT answered by auth6s within 1 second; Available since pdns_recursor v4.x
query / second
Type: float
powerdns.recursor.cache_entries

The number of entries in the cache
entry / None
Type: float
powerdns.recursor.cache_hits

The number of cache hits per second
hit / second
Type: float
powerdns.recursor.cache_misses

The number of cache misses per second
miss / second
Type: float
powerdns.recursor.case_mismatches

The number of mismatches in character case per second
error / second
Type: float
powerdns.recursor.chain_resends

The number of queries per second chained to existing outstanding query
query / second
Type: float
powerdns.recursor.client_parse_errors

The number of unparseable packets per second
error / second
Type: float
powerdns.recursor.concurrent_queries

The number of MThreads currently running
query / None
Type: float
powerdns.recursor.dlg_only_drops

The number of records dropped per second because of 'delegation only' setting; Available since pdns_recursor v4.x
record / second
Type: float
powerdns.recursor.dnssec_queries

The number of queries received per second with the DO bit set; Available since pdns_recursor v4.x
record / second
Type: float
powerdns.recursor.dnssec_result_bogus

The number of DNSSEC validations per second that had the Bogus state; Available since pdns_recursor v4.x
None / None
Type: float
powerdns.recursor.dnssec_result_indeterminate

The number of DNSSEC validations per second that had the Indeterminate state; Available since pdns_recursor v4.x
None / None
Type: float
powerdns.recursor.dnssec_result_insecure

The number of DNSSEC validations per second that had the Insecure state; Available since pdns_recursor v4.x
None / None
Type: float
powerdns.recursor.dnssec_result_nta

The number of DNSSEC validations per second that had the NTA (negative trust anchor) state; Available since pdns_recursor v4.x
None / None
Type: float
powerdns.recursor.dnssec_result_secure

The number of DNSSEC validations per second that had the Secure state; Available since pdns_recursor v4.x
None / None
Type: float
powerdns.recursor.dnssec_validations

The number of DNSSEC validations performed per second; Available since pdns_recursor v4.x
None / None
Type: float
powerdns.recursor.dont_outqueries

The number of outgoing queries dropped per second because of 'dont query' setting
query / second
Type: float
powerdns.recursor.edns_ping_matches

The number of servers per second that sent a valid EDNS PING response; Available since pdns_recursor v4.x
server / second
Type: float
powerdns.recursor.edns_ping_mismatches

The number of servers per second that sent an invalid EDNS PING response; Available since pdns_recursor v4.x
server / second
Type: float
powerdns.recursor.failed_host_entries

The number of servers that failed to resolve
server / None
Type: float
powerdns.recursor.ignored_packets

The number of non-query packets received per second on server sockets that should only get queries; Available since pdns_recursor v4.x
packet / second
Type: float
powerdns.recursor.ipv6_outqueries

The number of outgoing queries per second over IPv6
None / second
Type: float
powerdns.recursor.ipv6_questions

The number of end-user-initiated IPv6 UDP queries with the RD bit set
query / second
Type: float
powerdns.recursor.max_mthread_stack

The maximum amount of thread stack ever used
None / None
Type: float
powerdns.recursor.negcache_entries

The number of entries in the negative answer cache
entry / None
Type: float
powerdns.recursor.no_error_packets

The number of erroneous packets received per second; Available since pdns_recursor v4.x
packet / second
Type: float
powerdns.recursor.noedns_outqueries

The number of queries per second sent without EDNS; Available since pdns_recursor v4.x
query / second
Type: float
powerdns.recursor.noerror_answers

The number of NOERROR answers per second
operation / second
Type: float
powerdns.recursor.noping_outqueries

The number of queries per second sent without EDNS PING; Available since pdns_recursor v4.x
query / second
Type: float
powerdns.recursor.nsset_invalidations

The number of times per second an nsset was dropped because it no longer worked; Available since pdns_recursor v4.x
None / None
Type: float
powerdns.recursor.nsspeeds_entries

The number of entries in the NS speeds map; Available since pdns_recursor v4.x
entry / None
Type: float
powerdns.recursor.nxdomain_answers

The number of NXDOMAIN answers per second
response / second
Type: float
powerdns.recursor.outgoing4_timeouts

The number of timeouts per second for outgoing UDP IPv4 queries; Available since pdns_recursor v4.x
timeout / second
Type: float
powerdns.recursor.outgoing6_timeouts

The number of timeouts per second for outgoing UDP IPv6 queries; Available since pdns_recursor v4.x
timeout / second
Type: float
powerdns.recursor.outgoing_timeouts

The number of outgoing UDP query timeouts per second
timeout / second
Type: float
powerdns.recursor.over_capacity_drops

The number of questions per second dropped due to having reached concurrent query limit
query / second
Type: float
powerdns.recursor.packetcache_entries

The number of entries in the packet cache
entry / None
Type: float
powerdns.recursor.packetcache_hits

The number of packet cache hits per second
hit / second
Type: float
powerdns.recursor.packetcache_misses

The number of packet cache misses per second
miss / second
Type: float
powerdns.recursor.policy_drops

The number of packets dropped per second because of Lua policy decision
packet / second
Type: float
powerdns.recursor.policy_result_custom

The number of packets per second that were sent a custom answer by the RPZ/filter engine; Available since pdns_recursor v4.x
packet / second
Type: float
powerdns.recursor.policy_result_drop

The number of packets per second dropped by the RPZ/filter engine; Available since pdns_recursor v4.x
packet / second
Type: float
powerdns.recursor.policy_result_noaction

The number of packets per second that were not actioned upon by the RPZ/filter engine; Available since pdns_recursor v4.x
packet / second
Type: float
powerdns.recursor.policy_result_nodata

The number of packets per second that were replied to with NODATA by the RPZ/filter engine; Available since pdns_recursor v4.x
packet / second
Type: float
powerdns.recursor.policy_result_nxdomain

The number of packets per second that were replied to with NXDOMAIN by the RPZ/filter engine; Available since pdns_recursor v4.x
packet / second
Type: float
powerdns.recursor.policy_result_truncate

The number of packets per second that were forced to TCP by the RPZ/filter engine; Available since pdns_recursor v4.x
packet / second
Type: float
powerdns.recursor.qa_latency

The average latency in microseconds exponentially weighted over past 'latency-statistic-size' packets
microsecond / None
Type: float
powerdns.recursor.questions

The number of user initiated udp queries per second
operation / second
Type: float
powerdns.recursor.real_memory_usage

The amount of memory consumed by PowerDNS in bytes; Available since pdns_recursor v4.x
byte / None
Type: float
powerdns.recursor.resource_limits

The number of queries per second that could not be performed due to resource limits; Available since pdns_recursor v4.x
query / second
Type: float
powerdns.recursor.server_parse_errors

The number of server replied packets per second that could not be parsed
error / second
Type: float
powerdns.recursor.servfail_answers

The number of SERVFAIL answers per second
response / second
Type: float
powerdns.recursor.spoof_prevents

The number of times per second PowerDNS considers itself spoofed and drops data
None / None
Type: float
powerdns.recursor.sys_msec

The number of CPU milliseconds spent in 'system' mode
millisecond / None
Type: float
powerdns.recursor.tcp_client_overflow

The number of outgoing queries dropped per second because of 'dont query' setting
query / second
Type: float
powerdns.recursor.tcp_clients

The number of active TCP/IP clients per second
None / None
Type: float
powerdns.recursor.tcp_outqueries

The number of outgoing TCP queries per second
operation / second
Type: float
powerdns.recursor.tcp_questions

The number of incoming tcp queries per second
operation / second
Type: float
powerdns.recursor.throttle_entries

The number of entries in the throttle map
entry / None
Type: float
powerdns.recursor.throttled_out

The number of throttled outgoing UDP queries per second
operation / second
Type: float
powerdns.recursor.too_old_drops

The number of questions per second that were dropped because they were too old; Available since pdns_recursor v4.x
query / second
Type: float
powerdns.recursor.udp_in_errors

The number of packets per second that were received faster than the OS could process them; Available since pdns_recursor v4.x
packet / second
Type: float
powerdns.recursor.udp_noport_errors

The number of UDP packets per second where an ICMP response was received saying the remote port was not listening; Available since pdns_recursor v4.x
packet / second
Type: float
powerdns.recursor.udp_recvbuf_errors

The number of errors per second caused in the UDP receive buffer; Available since pdns_recursor v4.x
error / second
Type: float
powerdns.recursor.udp_sndbuf_errors

The number of errors per second caused in the UDP send buffer; Available since pdns_recursor v4.x
error / second
Type: float
powerdns.recursor.unauthorized_tcp

The number of TCP questions denied per second because of allow-from restrictions
operation / second
Type: float
powerdns.recursor.unauthorized_udp

The number of UDP questions denied per second because of allow-from restrictions
operation / second
Type: float
powerdns.recursor.unexpected_packets

The number of unexpected answers per second from remote servers
operation / second
Type: float
powerdns.recursor.unreachables

The number times per second nameservers were unreachable
None / None
Type: float
powerdns.recursor.uptime

The number of seconds PowerDNS has been running
second / None
Type: float
powerdns.recursor.user_msec

The number of CPU milliseconds spent in 'user' mode
millisecond / None
Type: float
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Monday  —  Friday.

10am  —  6pm UK.

Dedicated Support.