diff --git a/roles/prometheus/templates/prometheus.yml.j2 b/roles/prometheus/templates/prometheus.yml.j2 index 42d3a61..c4a1473 100644 --- a/roles/prometheus/templates/prometheus.yml.j2 +++ b/roles/prometheus/templates/prometheus.yml.j2 @@ -104,6 +104,25 @@ scrape_configs: {% endfor %} {% endfor %} + # This one does the same thing but for HTTP-only clients + - job_name: "generic-http" + scheme: "http" + static_configs: + - targets: +{% for host in groups['tags_nagios'] %} +{% set vars = hostvars[host] %} +{% for service in vars.services %} +{% for tag in service.tags %} +{# #} +{% if tag.slug == "prom-metrics-http" %} +{% for port in service.ports %} + - "{{ service.name }}:{{ port }}" +{% endfor %} +{% endif %} +{# #} +{% endfor %} +{% endfor %} +{% endfor %} # These two jobs are included for every node in our inventory - job_name: "node-exporter" static_configs: