Use a prom variable and not a synapse role variable

This commit is contained in:
Stuart Mumford 2021-07-02 15:41:36 +00:00
parent 09ee5ce52e
commit 2aa457efcc
3 changed files with 3 additions and 1 deletions

View File

@ -1768,6 +1768,7 @@ matrix_prometheus_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_en
matrix_prometheus_scraper_synapse_enabled: "{{ matrix_synapse_enabled and matrix_synapse_metrics_enabled }}"
matrix_prometheus_scraper_synapse_targets: ['matrix-synapse:{{ matrix_synapse_metrics_port }}']
matrix_prometheus_scraper_synapse_workers_enabled_list: "{{ matrix_synapse_workers_enabled_list }}"
matrix_prometheus_scraper_synapse_rules_synapse_tag: "{{ matrix_synapse_docker_image_tag }}"
matrix_prometheus_scraper_node_enabled: "{{ matrix_prometheus_node_exporter_enabled }}"

View File

@ -34,6 +34,7 @@ matrix_prometheus_scraper_synapse_rules_synapse_tag: "master"
matrix_prometheus_scraper_synapse_rules_download_url: "https://raw.githubusercontent.com/matrix-org/synapse/{{ matrix_prometheus_scraper_synapse_rules_synapse_tag }}/contrib/prometheus/synapse-v2.rules"
matrix_prometheus_scraper_synapse_targets: []
matrix_prometheus_scraper_synapse_workers_enabled_list: []
# Tells whether the "node" scraper configuration is enabled.
# This configuration aims to scrape the current node (this server).

View File

@ -35,7 +35,7 @@ scrape_configs:
instance: {{ matrix_domain }}
job: master
index: 0
{% for worker in matrix_synapse_workers_enabled_list|d([]) %}
{% for worker in matrix_prometheus_scraper_synapse_workers_enabled_list %}
{% if worker.metrics_port != 0 %}
- targets: ['matrix-synapse-worker-{{ worker.type }}-{{ worker.instanceId }}:{{ worker.metrics_port }}']
labels: