From 3c4370ca2faba1d6254360d17c72af30c53554ee Mon Sep 17 00:00:00 2001 From: undefined Date: Sun, 3 Dec 2023 17:54:21 +0800 Subject: prometheus-mongodb-exporter: fix service ExecStart --- .../services/monitoring/prometheus/exporters/mongodb.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'nixos/modules') diff --git a/nixos/modules/services/monitoring/prometheus/exporters/mongodb.nix b/nixos/modules/services/monitoring/prometheus/exporters/mongodb.nix index db5c4d15be66..b36a09c60920 100644 --- a/nixos/modules/services/monitoring/prometheus/exporters/mongodb.nix +++ b/nixos/modules/services/monitoring/prometheus/exporters/mongodb.nix @@ -55,12 +55,12 @@ in RuntimeDirectory = "prometheus-mongodb-exporter"; ExecStart = '' ${getExe pkgs.prometheus-mongodb-exporter} \ - --mongodb.uri=${cfg.uri} + --mongodb.uri="${cfg.uri}" \ ${if cfg.collectAll then "--collect-all" else concatMapStringsSep " " (x: "--collect.${x}") cfg.collector} \ - --collector.collstats=${concatStringsSep "," cfg.collStats} \ - --collector.indexstats=${concatStringsSep "," cfg.indexStats} \ - --web.listen-address=${cfg.listenAddress}:${toString cfg.port} \ - --web.telemetry-path=${cfg.telemetryPath} \ + ${optionalString (length cfg.collStats > 0) "--mongodb.collstats-colls=${concatStringsSep "," cfg.collStats}"} \ + ${optionalString (length cfg.indexStats > 0) "--mongodb.indexstats-colls=${concatStringsSep "," cfg.indexStats}"} \ + --web.listen-address="${cfg.listenAddress}:${toString cfg.port}" \ + --web.telemetry-path="${cfg.telemetryPath}" \ ${escapeShellArgs cfg.extraFlags} ''; }; -- cgit 1.4.1