Merge pull request #271835 from undefined-moe/patch-2

prometheus-mongodb-exporter: fix service ExecStart
This commit is contained in:
Nick Cao 2023-12-03 09:35:28 -05:00 committed by GitHub
commit fba68401fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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}
'';
};