10 cfg = config.services.prometheus.exporters.bird;
21 birdVersion = mkOption {
28 Specifies whether BIRD1 or BIRD2 is in use.
31 birdSocket = mkOption {
33 default = "/run/bird/bird.ctl";
35 Path to BIRD2 (or BIRD1 v4) socket.
38 newMetricFormat = mkOption {
42 Enable the new more-generic metric format.
48 SupplementaryGroups = singleton (if cfg.birdVersion == 1 then "bird" else "bird2");
50 ${pkgs.prometheus-bird-exporter}/bin/bird_exporter \
51 -web.listen-address ${cfg.listenAddress}:${toString cfg.port} \
52 -bird.socket ${cfg.birdSocket} \
53 -bird.v2=${if cfg.birdVersion == 2 then "true" else "false"} \
54 -format.new=${if cfg.newMetricFormat then "true" else "false"} \
55 ${concatStringsSep " \\\n " cfg.extraFlags}
57 RestrictAddressFamilies = [
58 # Need AF_UNIX to collect data