From 5c87b1c0e7823778dee3513dd1e2184f2c120392 Mon Sep 17 00:00:00 2001 From: Jacob Babor Date: Wed, 10 Jul 2024 00:27:52 -0500 Subject: [PATCH] Add Matrix health checks to Prometheus --- roles/prometheus/templates/prometheus.yml.j2 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/roles/prometheus/templates/prometheus.yml.j2 b/roles/prometheus/templates/prometheus.yml.j2 index f90930f..0dc3464 100644 --- a/roles/prometheus/templates/prometheus.yml.j2 +++ b/roles/prometheus/templates/prometheus.yml.j2 @@ -20,11 +20,19 @@ scrape_configs: {% for host in groups['tags_nagios'] %} {% for service in vars.services %} {% for tag in service.tags %} +{# #} {% if tag.slug == "nagios-checkhttps" %} {% for port in service.ports %} - "https://{{ service.name }}:{{ port }}" {% endfor %} {% endif %} +{# #} +{% if tag.slug == "nagios-checkmatrix" %} +{% for port in service.ports %} + - "https://{{ service.name }}:{{ port }}/health" +{% endfor %} +{% endif %} +{# #} {% endfor %} {% endfor %} {% endfor %}