簡體   English   中英

使用 Prometheus 從其他 Kubernetes 集群監控 Kubernetes 集群

[英]Monitor Kubernetes Cluster from other Kubernetes cluster with Prometheus

我已經在 Azure AKS 上運行了多個 Kubernetes 集群,因此我打算使用 Prometheus-Grafana 創建在其他 Kubernetes 集群上運行的集中監控集群

集中監控

我的想法是:

  • 隔離和集中監控集群。
  • 如果任何集群被關閉,監控集群仍然活着以檢查關閉的集群。
  • 運行跨雲提供商 Kubernetes(如果可用)

我對連接集群、網絡、入口、Prometheus 如何發現、從集群外部提取指標感到困惑……

是否有任何最佳實踐,我的用例說明。 謝謝!

是的,Prometheus 是一個非常靈活的監控解決方案,其中每個 Prometheus 服務器都能夠充當另一個 Prometheus 服務器的目標。 使用 prometheus federation,Prometheus 服務器可以從其他 Prometheus 服務器中抓取選定的時間序列數據。

A typical Prometheus federation example configuration looks like this:

- job_name: 'federate'
  scrape_interval: 15s

  honor_labels: true
  metrics_path: '/federate'

  params:
    'match[]':
      - '{job="prometheus"}'
      - '{__name__=~"job:.*"}'

  static_configs:
    - targets:
      - 'source-prometheus-1:9090'
      - 'source-prometheus-2:9090'
      - 'source-prometheus-3:9090'

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM