PowerDNS
Prometheus Metrics
PowerDNS is a high-performance DNS server available as an Authoritative Server and a Recursor. Starting with Authoritative Server 4.3+ and Recursor 4.5+, PowerDNS exposes a built-in Prometheus metrics endpoint through its web server.
Prometheus Metrics
Section titled “Prometheus Metrics”Service Configuration
Section titled “Service Configuration”Enable the built-in web server in your PowerDNS configuration (/etc/powerdns/pdns.conf):
webserver=yeswebserver-address=127.0.0.1webserver-port=8081webserver-allow-from=127.0.0.1api=yesapi-key=changemeRestart PowerDNS to apply the change:
sudo systemctl restart pdnsVerify the metrics endpoint is accessible:
curl http://localhost:8081/metricsFor more details, see the PowerDNS HTTP API documentation.
Glouton Configuration
Section titled “Glouton Configuration”sudo tee /etc/glouton/conf.d/99-powerdns.conf > /dev/null << 'EOF'metric: prometheus: targets: - url: "http://localhost:8081/metrics" name: "powerdns" allow_metrics: - "pdns_auth_queries" - "pdns_auth_answers" - "pdns_auth_cache_hits" - "pdns_auth_cache_misses" - "pdns_auth_latency_average" - "pdns_auth_udp_answers"EOFCreate or edit C:\ProgramData\glouton\conf.d\99-powerdns.conf:
metric: prometheus: targets: - url: "http://localhost:8081/metrics" name: "powerdns" allow_metrics: - "pdns_auth_queries" - "pdns_auth_answers" - "pdns_auth_cache_hits" - "pdns_auth_cache_misses" - "pdns_auth_latency_average" - "pdns_auth_udp_answers"Glouton automatically detects configuration changes.
| Metric | Description |
|---|---|
pdns_auth_queries | Total number of DNS queries received |
pdns_auth_answers | Total number of DNS answers sent |
pdns_auth_cache_hits | Total number of packet cache hits |
pdns_auth_cache_misses | Total number of packet cache misses |
pdns_auth_latency_average | Average query latency in microseconds |
pdns_auth_udp_answers | Total number of answers sent over UDP |