make them show as jobs in grafana

This commit is contained in:
Stuart Mumford 2021-06-30 21:30:18 +00:00
parent 7b52e6ad5e
commit 3d063f6ace

View File

@ -30,15 +30,20 @@ scrape_configs:
- job_name: 'synapse' - job_name: 'synapse'
metrics_path: '/_synapse/metrics' metrics_path: '/_synapse/metrics'
static_configs: static_configs:
- targets: - targets: {{ matrix_prometheus_scraper_synapse_targets|to_json }}
{% for target in matrix_prometheus_scraper_synapse_targets %} labels:
- {{ target }} instance: {{ matrix_domain }}
{% endfor %} job: master
{% for worker in matrix_synapse_workers_enabled_list|d([]) %} index: 1
{% if worker.metrics_port != 0 %} {% for worker in matrix_synapse_workers_enabled_list|d([]) %}
- 'matrix-synapse-worker-{{ worker.type }}-{{ worker.instanceId }}:{{ worker.metrics_port }}' {% if worker.metrics_port != 0 %}
{% endif %} - targets: ['matrix-synapse-worker-{{ worker.type }}-{{ worker.instanceId }}:{{ worker.metrics_port }}']
{% endfor %} labels:
instance: {{ matrix_domain }}
job: {{ worker.type }}
index: {{ worker.instanceId }}
{% endif %}
{% endfor %}
{% endif %} {% endif %}
{% if matrix_prometheus_scraper_node_enabled %} {% if matrix_prometheus_scraper_node_enabled %}