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

Prometheus metrics namespace label collision #613

Closed
karlskewes opened this issue Jul 20, 2021 · 0 comments · Fixed by #614
Closed

Prometheus metrics namespace label collision #613

karlskewes opened this issue Jul 20, 2021 · 0 comments · Fixed by #614
Labels

Comments

@karlskewes
Copy link
Contributor

karlskewes commented Jul 20, 2021

Since #463 we have the namespace label on metrics. 🎉

This is great but it clashes with the default namespace label , eg: namespace="sealed-secrets" that Prometheus adds as part of service discovery.
This means that any dashboards and alerts will still have sealed-secrets as the namespace instead the namespace the secret was unable to be unsealed in, eg: test.

We can prefer the controller's metric namespace, eg: test by toggling the honor_labels flag to true in the PodMonitor per docs snippet:

# honor_labels controls how Prometheus handles conflicts between labels that are
# already present in scraped data and labels that Prometheus would attach
# server-side ("job" and "instance" labels, manually configured target
# labels, and labels generated by service discovery implementations).
#
# If honor_labels is set to "true", label conflicts are resolved by keeping label
# values from the scraped data and ignoring the conflicting server-side labels.
#
# If honor_labels is set to "false", label conflicts are resolved by renaming
# conflicting labels in the scraped data to "exported_<original-label>" (for
# example "exported_instance", "exported_job") and then attaching server-side
# labels.
<snip>
[ honor_labels: <boolean> | default = false ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants