Browse Source

prometheus-server: Scrape DNS servers

Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
Maximilian Wilhelm 1 year ago
parent
commit
738938fcf1
1 changed files with 9 additions and 0 deletions
  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 %}