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:
@@ -57,9 +57,9 @@ let
|
|||||||
"-web.listen-address=${cfg.listenAddress}"
|
"-web.listen-address=${cfg.listenAddress}"
|
||||||
"-alertmanager.notification-queue-capacity=${toString cfg.alertmanagerNotificationQueueCapacity}"
|
"-alertmanager.notification-queue-capacity=${toString cfg.alertmanagerNotificationQueueCapacity}"
|
||||||
"-alertmanager.timeout=${toString cfg.alertmanagerTimeout}s"
|
"-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
|
# This becomes the main config file for Prometheus 2
|
||||||
promConfig2 = {
|
promConfig2 = {
|
||||||
@@ -91,8 +91,8 @@ let
|
|||||||
"--web.listen-address=${cfg2.listenAddress}"
|
"--web.listen-address=${cfg2.listenAddress}"
|
||||||
"--alertmanager.notification-queue-capacity=${toString cfg2.alertmanagerNotificationQueueCapacity}"
|
"--alertmanager.notification-queue-capacity=${toString cfg2.alertmanagerNotificationQueueCapacity}"
|
||||||
"--alertmanager.timeout=${toString cfg2.alertmanagerTimeout}s"
|
"--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 {
|
promTypes.globalConfig = types.submodule {
|
||||||
options = {
|
options = {
|
||||||
|
|||||||
Reference in New Issue
Block a user