From eb902af9197426485d3b7d0c02f7d9bbd25ba5fb Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Fri, 4 Feb 2022 18:53:06 +0100 Subject: [PATCH] Variable of the prometheus metrics port. --- defaults/main.yml | 1 + templates/daemon.json.j2 | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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 %}