Correct PROMETHEUS_EXTERNAL_URL - align with Alertmanager
Change-Id: I50efd2620d1e88ecaa99856dc879228771aa0ad4
Related-bug: PROD-34380
diff --git a/docker/swarm/stack/monitoring/prometheus/init.yml b/docker/swarm/stack/monitoring/prometheus/init.yml
index d7db52c..d38f5f8 100644
--- a/docker/swarm/stack/monitoring/prometheus/init.yml
+++ b/docker/swarm/stack/monitoring/prometheus/init.yml
@@ -2,6 +2,8 @@
- system.prometheus.server.container
parameters:
_param:
+ prometheus_external_url: ${_param:cluster_public_host}
+ prometheus_external_proto: https
# Backward compatibility for Prometheus 1.7
prometheus_storage_local_engine: "persisted"
prometheus_storage_heap_size: 3221225472
@@ -39,7 +41,7 @@
PROMETHEUS_BIND_PORT: ${prometheus:server:bind:port}
PROMETHEUS_BIND_ADDRESS: ${prometheus:server:bind:address}
PROMETHEUS_STORAGE_LOCAL_RETENTION: ${prometheus:server:storage:local:retention}
- PROMETHEUS_EXTERNAL_URL: "https://${_param:stacklight_monitor_address}:15010"
+ PROMETHEUS_EXTERNAL_URL: "${_param:prometheus_external_proto}://${_param:prometheus_external_url}:15010"
# Backward compatibility for Prometheus 1.7
PROMETHEUS_STORAGE_LOCAL_ENGINE: ${_param:prometheus_storage_local_engine}
PROMETHEUS_STORAGE_LOCAL_TARGET_HEAP_SIZE: ${_param:prometheus_storage_heap_size}