Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F4018152
D3372.id8697.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D3372.id8697.diff
View Options
diff --git a/_modules/paas_docker.py b/_modules/paas_docker.py
--- a/_modules/paas_docker.py
+++ b/_modules/paas_docker.py
@@ -91,6 +91,20 @@
]
+# -------------------------------------------------------------
+# Docker configuration
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+
+def build_daemon_config():
+ network = __salt__["node.resolve_network"]()
+
+ config = __pillar__.get("docker_daemon", {})
+ config["metrics-addr"] = network["private_ipv4_address"] + ":9323"
+
+ return config
+
+
# -------------------------------------------------------------
# Nginx
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/roles/paas-docker/docker/config.sls b/roles/paas-docker/docker/config.sls
--- a/roles/paas-docker/docker/config.sls
+++ b/roles/paas-docker/docker/config.sls
@@ -12,9 +12,8 @@
# Configure Docker engine
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-{% set daemon = pillar['docker_daemon'] %}
+{% set daemon = salt["paas_docker.build_daemon_config"]() %}
-{% if daemon %}
{{ dirs.etc }}/docker/daemon.json:
file.managed:
- source: salt://roles/paas-docker/docker/files/daemon.json.jinja
@@ -22,4 +21,3 @@
- mode: 644
- context:
daemon: {{ daemon }}
-{% endif %}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jan 19, 05:59 (20 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2360391
Default Alt Text
D3372.id8697.diff (1 KB)
Attached To
Mode
D3372: Collect Docker metrics with Prometheus
Attached
Detach File
Event Timeline
Log In to Comment