summary refs log tree commit diff
path: root/nixos/modules/services/monitoring/prometheus/exporters/domain.nix
diff options
context:
space:
mode:
authorMartin Milata <martin@martinmilata.cz>2021-04-04 22:25:12 +0200
committerMartin Milata <martin@martinmilata.cz>2021-04-04 22:25:12 +0200
commit6840746f2d155f564030a7270924eadda6b5aa52 (patch)
tree925ed562b418756f547f2a2c93c5eba0b2e5af20 /nixos/modules/services/monitoring/prometheus/exporters/domain.nix
parent2c76567af391a2d0fa5a5b6909285a54368e7156 (diff)
downloadnixpkgs-6840746f2d155f564030a7270924eadda6b5aa52.tar
nixpkgs-6840746f2d155f564030a7270924eadda6b5aa52.tar.gz
nixpkgs-6840746f2d155f564030a7270924eadda6b5aa52.tar.bz2
nixpkgs-6840746f2d155f564030a7270924eadda6b5aa52.tar.lz
nixpkgs-6840746f2d155f564030a7270924eadda6b5aa52.tar.xz
nixpkgs-6840746f2d155f564030a7270924eadda6b5aa52.tar.zst
nixpkgs-6840746f2d155f564030a7270924eadda6b5aa52.zip
nixos/prometheus-domain-exporter: init
Diffstat (limited to 'nixos/modules/services/monitoring/prometheus/exporters/domain.nix')
-rw-r--r--nixos/modules/services/monitoring/prometheus/exporters/domain.nix19
1 files changed, 19 insertions, 0 deletions
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}
+      '';
+    };
+  };
+}