ansible-debops-infrastructure

DebOps and Ansible scripts to manage my infrastructure
git clone git://git.erethon.com/ansible-debops-infrastructure
Log | Files | Refs

commit 23ac0196e50283e4164ffef32449bd497cc93bee
parent b9d7365ca8434b8936ab4bb48dbf03ba328a77a7
Author: Dionysis Grigoropoulos <dgrig@erethon.com>
Date:   Tue,  3 Mar 2020 04:07:40 +0200

prometheus: Add synapse job on prometheus template

Diffstat:
ansible/inventory/host_vars/productiongrafana/prometheus.yml | 5++++-
ansible/roles/prometheus/templates/prometheus.yml.j2 | 7+++++++
2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/ansible/inventory/host_vars/productiongrafana/prometheus.yml b/ansible/inventory/host_vars/productiongrafana/prometheus.yml @@ -1,7 +1,10 @@ --- -prometheus__node_targets: ['127.0.0.1', 'matrix.int.erethon.com', 'pgmatrix.int.erethon.com'] +prometheus__node_targets: ['127.0.0.1', 'matrix.int.erethon.com', + 'pgmatrix.int.erethon.com', 'oricono.int.erethon.com', + 'spinny.int.erethon.com'] prometheus__http_targets: ['https://erethon.com', 'https://blog.erethon.com', 'https://grafana.erethon.com', 'https://riot.dgrig.com', 'https://matrix.erethon.com', 'https://plothopes.com', 'https://f.erethon.com'] +prometheus__synapse_target: 'matrix.int.erethon.com' diff --git a/ansible/roles/prometheus/templates/prometheus.yml.j2 b/ansible/roles/prometheus/templates/prometheus.yml.j2 @@ -32,3 +32,10 @@ scrape_configs: - target_label: __address__ replacement: 127.0.0.1:9115 {% endif %} + +{% if prometheus__synapse_target is defined %} + - job_name: 'synapse' + metrics_path: '/_synapse/metrics' + static_configs: + - targets: ['{{ prometheus__synapse_target }}:9666'] +{% endif %}