Add Alertmanager prometheus endpoint and replace ports with variables
Change-Id: I55867b8e483e48204d6393a3542f254556262905
diff --git a/docker/swarm/service/monitoring/prometheus_alertmanager.yml b/docker/swarm/service/monitoring/prometheus_alertmanager.yml
index 5d5f237..942fa42 100644
--- a/docker/swarm/service/monitoring/prometheus_alertmanager.yml
+++ b/docker/swarm/service/monitoring/prometheus_alertmanager.yml
@@ -1,4 +1,4 @@
-include:
+classes:
- service.prometheus.alertmanager.container
parameters:
docker:
diff --git a/docker/swarm/service/monitoring/prometheus_pushgateway.yml b/docker/swarm/service/monitoring/prometheus_pushgateway.yml
index ad159b6..850f66e 100644
--- a/docker/swarm/service/monitoring/prometheus_pushgateway.yml
+++ b/docker/swarm/service/monitoring/prometheus_pushgateway.yml
@@ -1,3 +1,5 @@
+classes:
+- service.prometheus.pushgateway.container
parameters:
docker:
client:
@@ -5,8 +7,11 @@
prometheus_pushgateway:
network: monitoring
replicas: 2
+ environment:
+ bind_port: ${prometheus:pushgateway:bind:port}
+ bind_address: ${prometheus:pushgateway:bind:address}
restart:
condition: any
image: ${_param:docker_image_pushgateway}
ports:
- - 15012:9091
+ - 15012:${prometheus:pushgateway:bind:port}
diff --git a/docker/swarm/service/monitoring/prometheus_server.yml b/docker/swarm/service/monitoring/prometheus_server.yml
index 37bb6d3..5c0a480 100644
--- a/docker/swarm/service/monitoring/prometheus_server.yml
+++ b/docker/swarm/service/monitoring/prometheus_server.yml
@@ -1,4 +1,4 @@
-include:
+classes:
- service.prometheus.server.container
parameters:
docker:
diff --git a/docker/swarm/stack/monitoring.yml b/docker/swarm/stack/monitoring.yml
index 46a2845..bbc2d24 100644
--- a/docker/swarm/stack/monitoring.yml
+++ b/docker/swarm/stack/monitoring.yml
@@ -37,9 +37,12 @@
replicas: 2
restart_policy:
condition: any
+ environment:
+ bind_port: ${prometheus:pushgateway:bind:port}
+ bind_address: ${prometheus:pushgateway:bind:address}
image: ${_param:docker_image_pushgateway}
ports:
- - 15012:9091
+ - 15012:${prometheus:pushgateway:bind:port}
server:
networks:
- monitoring