diff --git a/defaults/main.yml b/defaults/main.yml index bcbb8cf..362de63 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -36,6 +36,7 @@ docker_log_to_journal: True docker_daemon_debug: False docker_prometheus_metrics: True docker_prometheus_host: 127.0.0.1 +docker_prometheus_metrics_port: 9323 # Usage: # node.labels.== diff --git a/templates/daemon.json.j2 b/templates/daemon.json.j2 index 3aea048..923d805 100644 --- a/templates/daemon.json.j2 +++ b/templates/daemon.json.j2 @@ -16,7 +16,7 @@ {% endif %} {% endif %} {% if docker_prometheus_metrics %} - "metrics-addr" : "{{ docker_prometheus_host }}:9323", + "metrics-addr" : "{{ docker_prometheus_host }}:{{ docker_prometheus_metrics_port }}", "experimental" : true, {% endif %} {% if docker_daemon_debug %}