nixos/prometheus: add webExternalUrl option
Similar to the prometheus.alertmanager.webExternalUrl option, but for Prometheus itself.
This commit is contained in:
parent
7a10601dc4
commit
cf58856d90
@ -39,6 +39,7 @@ let
|
||||
"-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}")
|
||||
];
|
||||
|
||||
promTypes.globalConfig = types.submodule {
|
||||
@ -467,6 +468,16 @@ in {
|
||||
Alert manager HTTP API timeout (in seconds).
|
||||
'';
|
||||
};
|
||||
|
||||
webExternalUrl = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
example = "https://example.com/";
|
||||
description = ''
|
||||
The URL under which Prometheus is externally reachable (for example,
|
||||
if Prometheus is served via a reverse proxy).
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user