Merge pull request #1153 from Cadair/worker_prom
Add worker metrics to prometheus exporter
This commit is contained in:
commit
b4d7ab0b53
|
@ -1777,6 +1777,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_enabled: "{{ matrix_synapse_enabled and matrix_synapse_metrics_enabled }}"
|
||||||
matrix_prometheus_scraper_synapse_targets: ['matrix-synapse:{{ matrix_synapse_metrics_port }}']
|
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_synapse_rules_synapse_tag: "{{ matrix_synapse_docker_image_tag }}"
|
||||||
|
|
||||||
matrix_prometheus_scraper_node_enabled: "{{ matrix_prometheus_node_exporter_enabled }}"
|
matrix_prometheus_scraper_node_enabled: "{{ matrix_prometheus_node_exporter_enabled }}"
|
||||||
|
|
|
@ -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_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_targets: []
|
||||||
|
matrix_prometheus_scraper_synapse_workers_enabled_list: []
|
||||||
|
|
||||||
# Tells whether the "node" scraper configuration is enabled.
|
# Tells whether the "node" scraper configuration is enabled.
|
||||||
# This configuration aims to scrape the current node (this server).
|
# This configuration aims to scrape the current node (this server).
|
||||||
|
|
|
@ -31,6 +31,19 @@ scrape_configs:
|
||||||
metrics_path: '/_synapse/metrics'
|
metrics_path: '/_synapse/metrics'
|
||||||
static_configs:
|
static_configs:
|
||||||
- targets: {{ matrix_prometheus_scraper_synapse_targets|to_json }}
|
- targets: {{ matrix_prometheus_scraper_synapse_targets|to_json }}
|
||||||
|
labels:
|
||||||
|
instance: {{ matrix_domain }}
|
||||||
|
job: master
|
||||||
|
index: 0
|
||||||
|
{% 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:
|
||||||
|
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 %}
|
||||||
|
|
Loading…
Reference in a new issue