10 cfg = config.services.prometheus.exporters.flow;
23 type = types.listOf types.str;
24 example = literalExpression ''[ "kafka.example.org:19092" ]'';
25 description = "List of Kafka brokers to connect to.";
29 type = types.ints.positive;
31 description = "The ASN being monitored.";
34 partitions = mkOption {
35 type = types.listOf types.int;
38 The number of the partitions to consume, none means all.
44 example = "pmacct.acct";
45 description = "The Kafka topic to consume from.";
53 ${pkgs.prometheus-flow-exporter}/bin/flow-exporter \
54 -asn ${toString cfg.asn} \
56 -brokers ${concatStringsSep "," cfg.brokers} \
57 ${optionalString (cfg.partitions != [ ]) "-partitions ${concatStringsSep "," cfg.partitions}"} \
58 -addr ${cfg.listenAddress}:${toString cfg.port} ${concatStringsSep " " cfg.extraFlags}