Add Matrix health checks to Prometheus

This commit is contained in:
Salt 2024-07-10 00:27:52 -05:00
parent e9971f304e
commit 5c87b1c0e7

View File

@ -20,11 +20,19 @@ scrape_configs:
{% for host in groups['tags_nagios'] %} {% for host in groups['tags_nagios'] %}
{% for service in vars.services %} {% for service in vars.services %}
{% for tag in service.tags %} {% for tag in service.tags %}
{# #}
{% if tag.slug == "nagios-checkhttps" %} {% if tag.slug == "nagios-checkhttps" %}
{% for port in service.ports %} {% for port in service.ports %}
- "https://{{ service.name }}:{{ port }}" - "https://{{ service.name }}:{{ port }}"
{% endfor %} {% endfor %}
{% endif %} {% endif %}
{# #}
{% if tag.slug == "nagios-checkmatrix" %}
{% for port in service.ports %}
- "https://{{ service.name }}:{{ port }}/health"
{% endfor %}
{% endif %}
{# #}
{% endfor %} {% endfor %}
{% endfor %} {% endfor %}
{% endfor %} {% endfor %}