mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2024-11-10 12:47:39 +01:00
Register docker network info and use it for prometheus-node-exporter
Using the hardcoded IP did break while I was messing with IPv6 stuff on the other branch
This commit is contained in:
parent
da82d670af
commit
144a5e6198
@ -23,6 +23,7 @@
|
|||||||
docker_network:
|
docker_network:
|
||||||
name: "{{ matrix_docker_network }}"
|
name: "{{ matrix_docker_network }}"
|
||||||
driver: bridge
|
driver: bridge
|
||||||
|
register: matrix_docker_network_info
|
||||||
|
|
||||||
- name: Ensure matrix-remove-all script created
|
- name: Ensure matrix-remove-all script created
|
||||||
template:
|
template:
|
||||||
|
@ -36,5 +36,5 @@ scrape_configs:
|
|||||||
{% if matrix_prometheus_node_exporter_enabled %}
|
{% if matrix_prometheus_node_exporter_enabled %}
|
||||||
- job_name: node
|
- job_name: node
|
||||||
static_configs:
|
static_configs:
|
||||||
- targets: ['172.18.0.1:9100']
|
- targets: ['{{ matrix_docker_network_info.network.IPAM.Config[0].Gateway }}:9100']
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
Loading…
Reference in New Issue
Block a user