소스 검색

prometheus-server: Scrape DNS servers

Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
Maximilian Wilhelm 1 년 전
부모
커밋
738938fcf1
1개의 변경된 파일9개의 추가작업 그리고 0개의 파일을 삭제
  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 %}