powerdns plugin¶
| Plugin name | powerdns |
| Type | read |
| Callbacks | config, read, shutdown |
| Status | supported |
| Since | 4.4 |
| Copyright | 2007–2008 C-Ware, Inc., 2008 Florian octo Forster |
| License | GPLv2 |
| Configuration | collectd.conf(5) |
The PowerDNS plugin connects to a local PowerDNS instance over the control sockets and queries information from the name server and the "recursor". Statistics include questions and answers by type, cache sizes, latency, etc.
Synopsis¶
<Plugin "powerdns">
<Server "server_name">
Collect "latency"
Collect "udp-answers" "udp-queries"
Collect "recursing-answers" "recursing-questions"
Collect "packetcache-hit" "packetcache-miss"
Collect "query-cache-hit" "query-cache-miss"
Collect "packetcache-size" "qsize-q"
Collect "corrupt-packets" "servfail-packets"
Collect "tcp-answers" "tcp-queries"
Collect "udp4-answers" "udp4-queries"
Collect "udp6-answers" "udp6-queries"
Collect "deferred-cache-inserts" "deferred-cache-lookup"
Socket "/var/run/pdns.controlsocket"
</Server>
<Recursor "recursor_name">
Collect "all-outqueries" "dlg-only-drops" "outgoing-timeouts"
Collect "tcp-outqueries" "throttled-out" "throttled-outqueries"
Collect "unreachables" "answers-slow" "answers0-1"
Collect "answers1-10" "answers10-100" "answers100-1000"
Collect "case-mismatches" "chain-resends" "client-parse-errors"
Collect "edns-ping-matches" "edns-ping-mismatches" "ipv6-outqueries"
Collect "no-packet-error" "noedns-outqueries" "noerror-answers"
Collect "noping-outqueries" "nsset-invalidations" "nxdomain-answers"
Collect "over-capacity-drops" "qa-latency" "questions"
Collect "resource-limits" "server-parse-errors" "servfail-answers"
Collect "spoof-prevents" "tcp-client-overflow" "tcp-questions unauthorized-tcp"
Collect "unauthorized-udp" "unexpected-packets" "cache-entries"
Collect "cache-hits cache-misses" "concurrent-queries" "negcache-entries"
Collect "nsspeeds-entries" "packetcache-entries" "packetcache-hits"
Collect "packetcache-misses" "sys-msec" "throttle-entries"
Collect "uptime user-msec"
Socket "/var/run/pdns_recursor.controlsocket"
</Recursor>
LocalSocket "/opt/collectd/var/run/collectd-powerdns"
</Plugin>
Please note that the stats listed here are for PowerDNS Server version 3.1 and PowerDNS recursor version 3.2, older versions might feature less stats and even some of their names have changed over time.
Example graphs¶
None yet. Add one now!
Dependencies¶
- none
Configuration¶
Configuration options · from collectd.conf(5)
See this section in the full configuration reference
The powerdns plugin queries statistics from an authoritative PowerDNS nameserver and/or a PowerDNS recursor. Since both offer a wide variety of values, many of which are probably meaningless to most users, but may be useful for some. So you may chose which values to collect, but if you don't, some reasonable defaults will be collected.
<Plugin "powerdns">
<Server "server_name">
Collect "latency"
Collect "udp-answers" "udp-queries"
Socket "/var/run/pdns.controlsocket"
</Server>
<Recursor "recursor_name">
Collect "questions"
Collect "cache-hits" "cache-misses"
Socket "/var/run/pdns_recursor.controlsocket"
</Recursor>
LocalSocket "/opt/collectd/var/run/collectd-powerdns"
</Plugin>
- Server and Recursor block
-
The Server block defines one authoritative server to query, the Recursor does the same for an recursing server. The possible options in both blocks are the same, though. The argument defines a name for the serverE<nbsp>/ recursor and is required.
- Collect Field
-
Using the Collect statement you can select which values to collect. Here, you specify the name of the values as used by the PowerDNS servers, e. g.
dlg-only-drops,answers10-100.The method of getting the values differs for Server and Recursor blocks: When querying the server a
SHOW *command is issued in any case, because that's the only way of getting multiple values out of the server at once. collectd then picks out the values you have selected. When querying the recursor, a command is generated to query exactly these values. So if you specify invalid fields when querying the recursor, a syntax error may be returned by the daemon and collectd may not collect any values at all.If no Collect statement is given, the following Server values will be collected:
- latency
- packetcache-hit
- packetcache-miss
- packetcache-size
- query-cache-hit
- query-cache-miss
- recursing-answers
- recursing-questions
- tcp-answers
- tcp-queries
- udp-answers
- udp-queries
The following Recursor values will be collected by default:
- noerror-answers
- nxdomain-answers
- servfail-answers
- sys-msec
- user-msec
- qa-latency
- cache-entries
- cache-hits
- cache-misses
- questions
Please note that up to that point collectd doesn't know what values are available on the server and values that are added do not need a change of the mechanism so far. However, the values must be mapped to collectd's naming scheme, which is done using a lookup table that lists all known values. If values are added in the future and collectd does not know about them, you will get an error much like this:
In this case please file a bug report with the collectd team.
- Socket Path
- Configures the path to the UNIX domain socket to be used when connecting to the daemon. By default
${localstatedir}/run/pdns.controlsocketwill be used for an authoritative server and${localstatedir}/run/pdns_recursor.controlsocketwill be used for the recursor.
- LocalSocket Path
- Querying the recursor is done using UDP. When using UDP over UNIX domain sockets, the client socket needs a name in the file system, too. You can set this local name to Path using the LocalSocket option. The default is
prefix/var/run/collectd-powerdns.