diff options
author | Sandro <sandro.jaeckel@gmail.com> | 2022-12-19 23:16:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-19 23:16:02 +0100 |
commit | bf46d7b626ba5ff43b60adf4297ea7d56392b0ca (patch) | |
tree | f19a0682b30ba2910015b8c7ee952142906c301d /nixos/modules | |
parent | 8a0118837cad5e741eb821ad24281400a84d4972 (diff) | |
parent | 3624f0bbf016e948f8f88d7e93f4a7d441979f13 (diff) | |
download | nixpkgs-bf46d7b626ba5ff43b60adf4297ea7d56392b0ca.tar nixpkgs-bf46d7b626ba5ff43b60adf4297ea7d56392b0ca.tar.gz nixpkgs-bf46d7b626ba5ff43b60adf4297ea7d56392b0ca.tar.bz2 nixpkgs-bf46d7b626ba5ff43b60adf4297ea7d56392b0ca.tar.lz nixpkgs-bf46d7b626ba5ff43b60adf4297ea7d56392b0ca.tar.xz nixpkgs-bf46d7b626ba5ff43b60adf4297ea7d56392b0ca.tar.zst nixpkgs-bf46d7b626ba5ff43b60adf4297ea7d56392b0ca.zip |
Merge pull request #172084 from priegger/prometheus-statsd-exporter
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/services/monitoring/prometheus/exporters.nix | 1 | ||||
-rw-r--r-- | nixos/modules/services/monitoring/prometheus/exporters/statsd.nix | 19 |
2 files changed, 20 insertions, 0 deletions
diff --git a/nixos/modules/services/monitoring/prometheus/exporters.nix b/nixos/modules/services/monitoring/prometheus/exporters.nix index 2451f46ba7d..f3fbfb149ad 100644 --- a/nixos/modules/services/monitoring/prometheus/exporters.nix +++ b/nixos/modules/services/monitoring/prometheus/exporters.nix @@ -68,6 +68,7 @@ let "smartctl" "smokeping" "sql" + "statsd" "surfboard" "systemd" "tor" diff --git a/nixos/modules/services/monitoring/prometheus/exporters/statsd.nix b/nixos/modules/services/monitoring/prometheus/exporters/statsd.nix new file mode 100644 index 00000000000..d9d732d8c12 --- /dev/null +++ b/nixos/modules/services/monitoring/prometheus/exporters/statsd.nix @@ -0,0 +1,19 @@ +{ config, lib, pkgs, options }: + +with lib; + +let + cfg = config.services.prometheus.exporters.statsd; +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} + ''; + }; + }; +} |