Skip to content

Commit

Permalink
nixos/prometheus/alertmanager: double hyphenate long opts (#34914)
Browse files Browse the repository at this point in the history
Alertmanager 0.13.0 doesn't support single dash long options, so '-config.file'
for example is parsed as '-c', which leads to the service not starting.
  • Loading branch information
eqyiel authored and benley committed Feb 12, 2018
1 parent 6acfa35 commit ac52cb3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions nixos/modules/services/monitoring/prometheus/alertmanager.nix
Expand Up @@ -111,11 +111,11 @@ in {
after = [ "network.target" ];
script = ''
${pkgs.prometheus-alertmanager.bin}/bin/alertmanager \
-config.file ${alertmanagerYml} \
-web.listen-address ${cfg.listenAddress}:${toString cfg.port} \
-log.level ${cfg.logLevel} \
${optionalString (cfg.webExternalUrl != null) ''-web.external-url ${cfg.webExternalUrl} \''}
${optionalString (cfg.logFormat != null) "-log.format ${cfg.logFormat}"}
--config.file ${alertmanagerYml} \
--web.listen-address ${cfg.listenAddress}:${toString cfg.port} \
--log.level ${cfg.logLevel} \
${optionalString (cfg.webExternalUrl != null) ''--web.external-url ${cfg.webExternalUrl} \''}
${optionalString (cfg.logFormat != null) "--log.format ${cfg.logFormat}"}
'';

serviceConfig = {
Expand Down

0 comments on commit ac52cb3

Please sign in to comment.