From 87d21f2e637614d8bc053b61c4fe601ff373edcb Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 6 Jan 2022 20:24:03 +0100 Subject: vidhar: prometheus: systemd: ... --- hosts/vidhar/prometheus/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'hosts/vidhar/prometheus') diff --git a/hosts/vidhar/prometheus/default.nix b/hosts/vidhar/prometheus/default.nix index c38ea16c..3fd07bbe 100644 --- a/hosts/vidhar/prometheus/default.nix +++ b/hosts/vidhar/prometheus/default.nix @@ -270,5 +270,14 @@ in { Environment = "NFT_HOSTNAME=localhost NFT_PORT=9901"; }; }; + + systemd.services."prometheus-systemd-exporter" = let + cfg = config.services.prometheus.exporters.systemd; + in { + serviceConfig.ExecStart = mkForce '' + ${pkgs.prometheus-systemd-exporter}/bin/systemd_exporter \ + --web.listen-address ${cfg.listenAddress}:${toString cfg.port} ${concatStringsSep " " cfg.extraFlags} + ''; + }; }; } -- cgit v1.2.3