Bläddra i källkod

prometheus-server: Scrape DNS servers

Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
Maximilian Wilhelm 1 år sedan
förälder
incheckning
738938fcf1
1 ändrade filer med 9 tillägg och 0 borttagningar
  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 %}