Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Topology labels are overridden in MetricsEndpointProvider #571

Closed
lucabello opened this issue Feb 2, 2024 · 1 comment · Fixed by #593
Closed

Topology labels are overridden in MetricsEndpointProvider #571

lucabello opened this issue Feb 2, 2024 · 1 comment · Fixed by #593

Comments

@lucabello
Copy link
Contributor

lucabello commented Feb 2, 2024

Bug Description

When instantiating MetricsEndpointProvider and explicitly providing scrape jobs, specifying labels for topology under static_configs gets them replaced by the charm's topology.

For Mimir HA, we need the coordinator to set the worker's topology in the scrape job; however, setting the following:

jobs = [
  {
    "static_configs": [{
      "targets": [address],
      "labels": {
        "juju_application": worker_application,
        ...
      }
    }]
  }
]

the labels found in Prometheus contain the topology of the coordinator instead.

This shouldn't happen.

@lucabello
Copy link
Contributor Author

We should solve this by not overriding labels in static_config if they're already specified in the scrape job, in the prometheus_scrape library.

As a workaround, currently this can be solved via relabel_configs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant