1

Can I deploy Prometheus to each Azure Kubernetes Service (AKS), and monitor each Prometheus from a Prometheus created by a virtual machine outside the AKS? In other words, I want to connect the Prometheus in the center with all Prometheus in each cluster.In other words, I want to connect the Prometheus in the center with all Prometheus in each cluster.

I would appreciate it if you could let me know the reference that is highly related to this. The composition we are thinking of is as follows.

enter image description here

2 Answers 2

1

Looks like you are looking for federation of Prometheus servers. Official documentation here.

Basically you'll need to configure your central Prometheus instance to scrape data from intermediate instances from path /federate.

Simple example of configuration for your case would be this:

scrape_configs:
  - job_name: 'federate'
    scrape_interval: 15s

    honor_labels: true
    metrics_path: '/federate'

    params:
      'match[]':
        - '{__name__=~".+"}'

    static_configs:
      - targets:
        - 'cluster-1-address:9090'
        - 'cluster-2-address:9090'
        - 'cluster-3-address:9090'

Be advised that federation doesn't preserve timestamps. As a result small discrepancies in data between central and intermediate servers could occur.

Be sure to configure scrape_interval in accordance with scrape_interval of intermediate instances: if central server will have smaller interval it will result in multiplication of data points and increase of storage space used. If central server will have bigger interval, you'll lose some data points.

0

Yes, it is possible to deploy Prometheus to each Azure Kubernetes Service (AKS) and monitor each Prometheus from a Prometheus created by a virtual machine outside the AKS. This can be achieved by using federation in Prometheus.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .