ansible-debops-infrastructure

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

commit 4287157f196c98518ccbbab0df4ca5ae7d993813
parent b6b4cbc149c7fbdad38efac5b4872a3b438754fb
Author: Dionysis Grigoropoulos <dgrig@erethon.com>
Date:   Mon, 16 Nov 2020 17:34:32 +0200

prometheus: Add a config section to monitor DoT

Diffstat:
ansible/inventory/host_vars/libreopsgrafana/prometheus.yml | 1+
ansible/roles/prometheus/templates/prometheus.yml.j2 | 19+++++++++++++++++++
2 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/ansible/inventory/host_vars/libreopsgrafana/prometheus.yml b/ansible/inventory/host_vars/libreopsgrafana/prometheus.yml @@ -6,3 +6,4 @@ prometheus__http_targets: ['https://libreops.cc', 'https://pad.libreops.cc', 'https://gnu.gr', 'https://diskuti.gr', 'https://doh.libredns.gr/dns-query?dns=lSIBAAABAAAAAAAACGxpYnJlZG5zAmdyAAABAAE', 'https://meet.libreops.cc'] +prometheus__dot_targets: ['dot.libredns.gr'] diff --git a/ansible/roles/prometheus/templates/prometheus.yml.j2 b/ansible/roles/prometheus/templates/prometheus.yml.j2 @@ -33,6 +33,25 @@ scrape_configs: replacement: 127.0.0.1:9115 {% endif %} +{% if prometheus__dot_targets is defined %} + - job_name: 'dot_blackbox' + metrics_path: /probe + params: + module: [dns] + static_configs: + - targets: +{% for target in prometheus__dot_targets %} + - {{ target }} +{% endfor %} + relabel_configs: + - source_labels: [__address__] + target_label: __param_target + - source_labels: [__param_target] + target_label: instance + - target_label: __address__ + replacement: 127.0.0.1:9115 +{% endif %} + {% if prometheus__postgres_targets is defined %} - job_name: 'postgres' static_configs: