diff --git a/ansible/roles/common/templates/conf/input/08-prometheus.conf.j2 b/ansible/roles/common/templates/conf/input/08-prometheus.conf.j2 index 1aa5da895e..10b35ed3e7 100644 --- a/ansible/roles/common/templates/conf/input/08-prometheus.conf.j2 +++ b/ansible/roles/common/templates/conf/input/08-prometheus.conf.j2 @@ -1,6 +1,6 @@ @type prometheus - bind {{ api_interface_address }} + bind "{{ api_interface_address | put_address_in_context('url') }}" port {{ prometheus_fluentd_integration_port }} metrics_path /metrics diff --git a/ansible/roles/prometheus/templates/prometheus-libvirt-exporter.json.j2 b/ansible/roles/prometheus/templates/prometheus-libvirt-exporter.json.j2 index ca67b6a422..47bf22571a 100644 --- a/ansible/roles/prometheus/templates/prometheus-libvirt-exporter.json.j2 +++ b/ansible/roles/prometheus/templates/prometheus-libvirt-exporter.json.j2 @@ -1,5 +1,5 @@ { - "command": "/opt/libvirt-exporter --web.listen-address={{ api_interface_address }}:{{ prometheus_libvirt_exporter_port }}", + "command": "/opt/libvirt-exporter --web.listen-address={{ api_interface_address | put_address_in_context('url') }}:{{ prometheus_libvirt_exporter_port }}", "config_files": [ {% if kolla_copy_ca_into_containers | bool %} { diff --git a/releasenotes/notes/promethus-exporters-ipv6-c87b57cd21cb6bfe.yaml b/releasenotes/notes/promethus-exporters-ipv6-c87b57cd21cb6bfe.yaml new file mode 100644 index 0000000000..2221663bbf --- /dev/null +++ b/releasenotes/notes/promethus-exporters-ipv6-c87b57cd21cb6bfe.yaml @@ -0,0 +1,8 @@ +--- +fixes: + - | + Correctly formats prometheus-libvirt-exporter and + Fluentd Prometheus exporter IPv6 listen addresses. + + Fixes `LP#2096659 + `__