BIND9 DNS Prometheus exporter.
version: "3.7"
services:
dns_exporter:
build: .
restart: unless-stopped
ports:
- "9119:9119/tcp"
The exporter needs to know on which URL to look for the BIND9 statistics. The url should be passed by the command line argument -bind.stats-url
.
The command line arguments also include an option to change the port on which the metrics are exposed. Do not do this as it breaks the health check. Instead map the port 9119 to any external port you like using Docker configuration.
BIND9 does not expose the statistics by default. You need to include the statistics-channels section in your named.conf file.
Name | Default value | Description |
---|---|---|
PUID | 7077 | UID of the user dns-exporter should be running as. The UID must have sufficient rights to read from the Docker socket. |
PGID | 7077 | GID of the user dns-exporter should be running as. You must set the PUID if you want to set the PGID variable. |
EXPORTER_ARGS | Command line arguments for the exporter binary |
Port | Description |
---|---|
9119/tcp | Prometheus metrics over HTTP |
The container does not expose any volumes.
The container is regularly scanned for vulnerabilities and updated. Further info can be found in the Security tab.
The container supports privilege drop. Even though the container starts as root, it will use the permissions only to perform the initial set up. The dns-exporter process runs as UID/GID provided in the PUID and PGID environment variables.
user
Docker compose property or using the --user
argument. This would break the privilege drop logic.