Adjust K8up metrics scraping to respect exported namespace label#169
Open
Adjust K8up metrics scraping to respect exported namespace label#169
namespace label#169Conversation
This is required in order to make the K8up metrics usable in OpenShift's user workload monitoring (UWM). Without this, the backup namespace is scraped as `exported_namespace` and `namespace` is the K8up namespace for all timeseries. This makes the metrics useless for UWM users, since UWM automatically restricts all queries with `namespace="<query source namespace>"` which can't match backups in the source namespace, if the backup namespace is exported as `exported_namespace`. The commit also adjusts the component-managed alerting rules to work with the new namespace label setup. Additionally, the commit also fixes the alert expression for the `K8upBackupNotRunning` alert to actually fire for individual namespaces.
|
🚀 Merging this PR will release Merging will trigger workflows 🛠️ Auto tagging enabled with label |
simu
commented
Oct 27, 2025
| message: No K8up jobs were run in {{ $labels.exported_namespace }} within the last 24 hours. Check the operator, there might be a deadlock | ||
| expr: sum(rate(k8up_jobs_total[25h])) == 0 and on(namespace) k8up_schedules_gauge > 0 | ||
| message: No K8up jobs were run in {{ $labels.namespace }} within the last 24 hours. Check the operator, there might be a deadlock | ||
| expr: sum by (namespace) (rate(k8up_jobs_total[25h])) == 0 and on(namespace) k8up_schedules_gauge > 0 |
Member
Author
There was a problem hiding this comment.
TODO: Figure out if we need to limit this to selected namespaces, currently we'd probably get paged for any stuck customer backups.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is required in order to make the K8up metrics usable in OpenShift's user workload monitoring (UWM). Without this, the backup namespace is scraped as
exported_namespaceandnamespaceis the K8up namespace for all timeseries. This makes the metrics useless for UWM users, since UWM automatically restricts all queries withnamespace="<query source namespace>"which can't match backups in the source namespace, if the backup namespace is exported asexported_namespace.The commit also adjusts the component-managed alerting rules to work with the new namespace label setup. Additionally, the commit also fixes the alert expression for the
K8upBackupNotRunningalert to actually fire for individual namespaces.Checklist
changelog.
The PR has a meaningful description that sums up the change. It will be
linked in the changelog.
bug,enhancement,documentation,change,breaking,dependencyas they show up in the changelog.