prometheus 基於DNS的目標發現


prometheus 基於DNS的目標發現

DNS服務發現依賴於查詢A、AAAA或SRV DNS記錄。

1、基於 SRV 記錄發現

scrape_configs:
  - job_name: 'webapp'
  dns_sd_configs:
    - names: [‘_prometheus._tcp.shhnwangjian.com]

注意:_prometheus 為服務名稱,_tcp 為協議, xiodi.cn 為域名

2、基於 A 記錄

- job_name: 'webapp'
  dns_sd_configs:
    - names: [ 'ops.shhnwangjian.cn']
      type: A
      port: 9090

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM