From 6840746f2d155f564030a7270924eadda6b5aa52 Mon Sep 17 00:00:00 2001 From: Martin Milata Date: Sun, 4 Apr 2021 22:25:12 +0200 Subject: nixos/prometheus-domain-exporter: init --- .../monitoring/prometheus/exporters/domain.nix | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 nixos/modules/services/monitoring/prometheus/exporters/domain.nix (limited to 'nixos/modules/services/monitoring/prometheus/exporters/domain.nix') diff --git a/nixos/modules/services/monitoring/prometheus/exporters/domain.nix b/nixos/modules/services/monitoring/prometheus/exporters/domain.nix new file mode 100644 index 00000000000..61e2fc80afd --- /dev/null +++ b/nixos/modules/services/monitoring/prometheus/exporters/domain.nix @@ -0,0 +1,19 @@ +{ config, lib, pkgs, options }: + +with lib; + +let + cfg = config.services.prometheus.exporters.domain; +in +{ + port = 9222; + serviceOpts = { + serviceConfig = { + ExecStart = '' + ${pkgs.prometheus-domain-exporter}/bin/domain_exporter \ + --bind ${cfg.listenAddress}:${toString cfg.port} \ + ${concatStringsSep " \\\n " cfg.extraFlags} + ''; + }; + }; +} -- cgit 1.4.1