:chart_with_upwards_trend: Prometheus metrics exporter for PowerDNS
PowerDNS exporter for Prometheus
Periodically scrapes metrics via the PowerDNS HTTP-API and exports them via HTTP/JSON for consumption by Prometheus.
Name | Description | Default |
---|---|---|
listen-address | Host:Port pair to run exporter on | :9120 |
metric-path | Path under which to expose metrics for Prometheus | /metrics |
api-url | Base-URL of PowerDNS authoritative server/recursor API | http://localhost:8001/ |
api-key | PowerDNS API Key | - |
The api-url
flag value should be passed in this format:
http://<HOST>:<API-PORT>/
http://<HOST>:<API-PORT>/api/v1
Typical way of installing in Go should work.
go install
A Makefile is provided in case you find a need for it.
See here for instructions on how to enable the HTTP API in PowerDNS.
Then run the exporter like this:
go run powerdns_exporter api-url="http://<HOST>:<API-PORT>/" -api-key="<YOUR_API_KEY>"
Show help:
go run powerdns_exporter --help
To run the PowerDNS exporter as a Docker container, run:
$ docker run -p 9120:9120 janeczku/powerdns-exporter -api-url="http://<HOST>:<API-PORT>/" -api-key="<YOUR_API_KEY>"