nixpkgs/nixos/modules/services/monitoring/prometheus/exporters/statsd.nix

19 lines
429 B
Nix

{ config, lib, pkgs, options, ... }:
let
cfg = config.services.prometheus.exporters.statsd;
inherit (lib) concatStringsSep;
in
{
port = 9102;
serviceOpts = {
serviceConfig = {
ExecStart = ''
${pkgs.prometheus-statsd-exporter}/bin/statsd_exporter \
--web.listen-address ${cfg.listenAddress}:${toString cfg.port} \
${concatStringsSep " \\\n " cfg.extraFlags}
'';
};
};
}