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

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

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

@ -20,7 +20,7 @@
- name: Build stream writer workers
ansible.builtin.set_fact:
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.
name: "matrix-synapse-worker-stream-writer-{{ idx }}-{{ item.stream | replace('_', '-') }}"
type: 'stream_writer'

Loading…
Cancel
Save