canonical / prometheus-k8s-operator

https://charmhub.io/prometheus-k8s
Apache License 2.0
21 stars 35 forks source link

Add `replica` to global config #517

Closed Abuelodelanada closed 3 months ago

Abuelodelanada commented 1 year ago

Enhancement Proposal

Nowadays our prometheus config only have:

global:
  evaluation_interval: 1m
  scrape_interval: 1m
  scrape_timeout: 10s

In HA deployments this is a problem if you need to distinguish the replicas of a set when talking to external systems.

To solve this we can add external_label.replica to global config, like this:

global:
  evaluation_interval: 1m
  scrape_interval: 1m
  scrape_timeout: 10s
  external_labels:
    replica: my-model-prometheus-0 # my-model-prometheus-1 for the second replica.