Khoa
Khoa

Reputation: 1948

Monitor Kubernetes Cluster from other Kubernetes cluster with Prometheus

I have run several Kubernetes Clusters on Azure AKS, so I intend to create Centralized Monitoring Cluster run on other Kubernetes cluster with Prometheus-Grafana.

Centralized Monitoring

My idea is that:

I'm confusing about connecting clusters, network, ingress, how does Prometheus discovery, pull metric from outside cluster...

Is there any best practice, instruction for my usecase. Thank you!

Upvotes: 1

Views: 996

Answers (1)

P Ekambaram
P Ekambaram

Reputation: 17689

Yes, Prometheus is a very flexible monitoring solution wherein each Prometheus server is able to act as a target for another Prometheus server. Using prometheus federation, Prometheus servers can scrape selected time series data from other Prometheus servers.

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'

Upvotes: 2

Related Questions