-
Notifications
You must be signed in to change notification settings - Fork 2k
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
kube_persistentvolume_*
and kube_persistentvolumeclaim_*
should expose the volume name under the same label
#2288
Comments
/assign @CatherineF-dev |
@dashpole there's a typo here ;) Also, I'm happy to help on this feature, if needed 👍 |
/triage accepted |
You can rename a metric label, as long as this metric is not marked as STABLE.
Free feel to open a PR @multani, I can help review |
This changes the name of the volume name label, reported by the `kube_persistentvolumeclaim_*` metrics, to be the same label as the one in the `kube_persistentvolume_*` metrics. This makes it easier to combine the 2 related set of metrics together to being labels and values from one metric into another. Closes: kubernetes#2288
This changes the name of the volume name label, reported by the `kube_persistentvolumeclaim_*` metrics, to be the same label as the one in the `kube_persistentvolume_*` metrics. This makes it easier to combine the 2 related set of metrics together to being labels and values from one metric into another. Closes: kubernetes#2288
I created #2303 to fix the issue. Looking at the code base, it seems the |
This changes the name of the volume name label, reported by the `kube_persistentvolumeclaim_*` metrics, to be the same label as the one in the `kube_persistentvolume_*` metrics. This makes it easier to combine the 2 related set of metrics together to being labels and values from one metric into another. Closes: kubernetes#2288
This changes the name of the volume name label, reported by the `kube_persistentvolumeclaim_*` metrics, to be the same label as the one in the `kube_persistentvolume_*` metrics. This makes it easier to combine the 2 related set of metrics together to being labels and values from one metric into another. Closes: kubernetes#2288
In the meantime the workaround - for info metrics - is something like
|
FYI, I'm currently mitigating this issue with a relabeling rule with (on the - action: replace
source_labels:
- volumename
regex: (.+)
target_label: persistentvolume |
What would you like to be added:
kube_persistentvolume_*
metrics andkube_persistentvolumeclaim_*
metrics should expose the "name of the volume" inside the same metric label.Why is this needed:
It's a bit difficult at the moment to combine the Persistent Volume and Persistent Volume Claim metrics together to get, for instance, the "size" of the PVC in a specific namespace:
kube_persistentvolume_*
metrics have apersistentvolume
label containing the name of the underlying persistent volume.kube_persistentvolumeclaim_*
on the other hand, expose the name of the persistent volume in thevolumename
labelIt's then difficult to combine both metrics together, and bring the PVC labels into the PV metric (or vice-versa) (see prometheus/prometheus#2204)
Describe the solution you'd like
Rename one of the two label to have the same label as the other metric.
Additional context
I was trying to get the "size" of the PVCs with a query like this, but it doesn't work because it's not possible to join on different labels:
The text was updated successfully, but these errors were encountered: