Pārlūkot izejas kodu

prometheus-server: Scrape DNS servers

Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
Maximilian Wilhelm 1 gadu atpakaļ
vecāks
revīzija
738938fcf1
1 mainītis faili ar 9 papildinājumiem un 0 dzēšanām
  1. 9 0
      prometheus-server/prometheus.yml

+ 9 - 0
prometheus-server/prometheus.yml

@@ -33,3 +33,12 @@ scrape_configs:
 {%- for node, node_config in salt['pillar.get']('nodes').items()|sort %}
         - {{ node }}:9100
 {%- endfor %}
+
+  - job_name: bind
+    static_configs:
+      - targets:
+{%- for node, node_config in salt['pillar.get']('nodes').items()|sort %}
+  {%- if salt['ffho.any_item_in_list'](['dns-auth', 'dns-recursor'], node_config.get('roles', [])) %}
+        - {{ node }}:9119
+  {%- endif %}
+{%- endfor %}