diff options
author | Pierre Bourdon <delroth@gmail.com> | 2018-10-20 04:40:11 +0200 |
---|---|---|
committer | Robin Gloster <mail@glob.in> | 2018-10-20 13:45:55 +0200 |
commit | cf58856d90e3a70cbee28bf702ed531daee19473 (patch) | |
tree | 2c764686c14a10c833c1ff317c1a504a0ad6240b /nixos | |
parent | 7a10601dc4f818ecc24097ac8ab38e2e0050cf1d (diff) |
nixos/prometheus: add webExternalUrl option
Similar to the prometheus.alertmanager.webExternalUrl option, but for Prometheus itself.
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/monitoring/prometheus/default.nix | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/nixos/modules/services/monitoring/prometheus/default.nix b/nixos/modules/services/monitoring/prometheus/default.nix index 5dda763bd56b7..e2ee995cea801 100644 --- a/nixos/modules/services/monitoring/prometheus/default.nix +++ b/nixos/modules/services/monitoring/prometheus/default.nix @@ -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). + ''; + }; }; }; |