1 { config, lib, pkgs, options, ... }:
4 cfg = config.services.prometheus.exporters.bind;
5 inherit (lib) mkOption types concatStringsSep;
12 default = "http://localhost:8053/";
14 HTTP XML API address of an Bind server.
17 bindTimeout = mkOption {
21 Timeout for trying to get stats from Bind.
24 bindVersion = mkOption {
25 type = types.enum [ "xml.v2" "xml.v3" "auto" ];
28 BIND statistics version. Can be detected automatically.
31 bindGroups = mkOption {
32 type = types.listOf (types.enum [ "server" "view" "tasks" ]);
33 default = [ "server" "view" ];
35 List of statistics to collect. Available: [server, view, tasks]
42 ${pkgs.prometheus-bind-exporter}/bin/bind_exporter \
43 --web.listen-address ${cfg.listenAddress}:${toString cfg.port} \
44 --bind.pid-file /var/run/named/named.pid \
45 --bind.timeout ${toString cfg.bindTimeout} \
46 --bind.stats-url ${cfg.bindURI} \
47 --bind.stats-version ${cfg.bindVersion} \
48 --bind.stats-groups ${concatStringsSep "," cfg.bindGroups} \
49 ${concatStringsSep " \\\n " cfg.extraFlags}