Fix prometheus.yml.j2 indentation and worker ids for stream writers

Fixes https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/2105
development
Slavi Pantaleev 2 years ago
parent 800267b182
commit b07fd76830

@ -32,17 +32,17 @@ scrape_configs:
static_configs: static_configs:
- targets: {{ matrix_prometheus_scraper_synapse_targets|to_json }} - targets: {{ matrix_prometheus_scraper_synapse_targets|to_json }}
labels: labels:
instance: {{ matrix_domain }} instance: {{ matrix_domain | to_json }}
job: master job: master
index: 0 index: 0
{% for worker in matrix_prometheus_scraper_synapse_workers_enabled_list %} {% for worker in matrix_prometheus_scraper_synapse_workers_enabled_list %}
{% if worker.metrics_port != 0 %} {% if worker.metrics_port != 0 %}
- targets: ['{{ worker.name }}:{{ worker.metrics_port }}'] - targets: ['{{ worker.name }}:{{ worker.metrics_port }}']
labels: labels:
instance: {{ matrix_domain }} instance: {{ matrix_domain | to_json }}
worker_id: {{ worker.id }} worker_id: {{ worker.id | to_json }}
job: {{ worker.type }} job: {{ worker.type | to_json }}
app: {{ worker.app }} app: {{ worker.app | to_json }}
{% endif %} {% endif %}
{% endfor %} {% endfor %}
{% endif %} {% endif %}

@ -20,7 +20,7 @@
- name: Build stream writer workers - name: Build stream writer workers
ansible.builtin.set_fact: ansible.builtin.set_fact:
worker: worker:
id: "stream-writer-{{ item }}-{{ item.stream }}" id: "stream-writer-{{ idx }}-{{ item.stream }}"
# Names must not include understores. Certain stream writer streams (to_device, account_data, ..) do, so we fix them up. # Names must not include understores. Certain stream writer streams (to_device, account_data, ..) do, so we fix them up.
name: "matrix-synapse-worker-stream-writer-{{ idx }}-{{ item.stream | replace('_', '-') }}" name: "matrix-synapse-worker-stream-writer-{{ idx }}-{{ item.stream | replace('_', '-') }}"
type: 'stream_writer' type: 'stream_writer'

Loading…
Cancel
Save