mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
nixos/prometheus: get rid of empty arguments
Previously the prometheus.service file looked like: ExecStart=/nix/store/wjkhfw3xgkmavz1akkqir99w4lbqhak7-prometheus-1.8.2-bin/bin/prometheus -storage.local.path=/var/lib/prometheus/metrics \ -config.file=/nix/store/zsnvzw51mk3n1cxjd0351bj39k1j6j27-prometheus.yml-check-config-checked \ -web.listen-address=0.0.0.0:9090 \ -alertmanager.notification-queue-capacity=10000 \ -alertmanager.timeout=10s \ \ Restart=always Now it's: ExecStart=/nix/store/wjkhfw3xgkmavz1akkqir99w4lbqhak7-prometheus-1.8.2-bin/bin/prometheus \ -storage.local.path=/var/lib/prometheus/metrics \ -config.file=/nix/store/zsnvzw51mk3n1cxjd0351bj39k1j6j27-prometheus.yml-check-config-checked \ -web.listen-address=0.0.0.0:9090 \ -alertmanager.notification-queue-capacity=10000 \ -alertmanager.timeout=10s Restart=always
This commit is contained in:
parent
a59c92903e
commit
7cf27feb2f
1 changed files with 5 additions and 5 deletions
|
@ -57,9 +57,9 @@ let
|
|||
"-web.listen-address=${cfg.listenAddress}"
|
||||
"-alertmanager.notification-queue-capacity=${toString cfg.alertmanagerNotificationQueueCapacity}"
|
||||
"-alertmanager.timeout=${toString cfg.alertmanagerTimeout}s"
|
||||
(optionalString (cfg.alertmanagerURL != []) "-alertmanager.url=${concatStringsSep "," cfg.alertmanagerURL}")
|
||||
(optionalString (cfg.webExternalUrl != null) "-web.external-url=${cfg.webExternalUrl}")
|
||||
];
|
||||
] ++
|
||||
(optional (cfg.alertmanagerURL != []) "-alertmanager.url=${concatStringsSep "," cfg.alertmanagerURL}") ++
|
||||
(optional (cfg.webExternalUrl != null) "-web.external-url=${cfg.webExternalUrl}");
|
||||
|
||||
# This becomes the main config file for Prometheus 2
|
||||
promConfig2 = {
|
||||
|
@ -91,8 +91,8 @@ let
|
|||
"--web.listen-address=${cfg2.listenAddress}"
|
||||
"--alertmanager.notification-queue-capacity=${toString cfg2.alertmanagerNotificationQueueCapacity}"
|
||||
"--alertmanager.timeout=${toString cfg2.alertmanagerTimeout}s"
|
||||
(optionalString (cfg2.webExternalUrl != null) "--web.external-url=${cfg2.webExternalUrl}")
|
||||
];
|
||||
] ++
|
||||
(optional (cfg2.webExternalUrl != null) "--web.external-url=${cfg2.webExternalUrl}");
|
||||
|
||||
promTypes.globalConfig = types.submodule {
|
||||
options = {
|
||||
|
|
Loading…
Reference in a new issue