kubevirt / kubevirt

Kubernetes Virtualization API and runtime in order to define and manage virtual machines.
https://kubevirt.io
Apache License 2.0
5.46k stars 1.31k forks source link

VM metrics should contains the vm and vmi's UUID #11795

Open matthewei opened 4 months ago

matthewei commented 4 months ago

Is your feature request related to a problem? Please describe: we can create the same name vm in different namespace. we collect vm's metrics from different kubevirt cluster. So I want to add vm and vmi's UUID tags to distinguish them.

Describe the solution you'd like: A clear and concise description of what you want to happen.

image

Describe alternatives you've considered: A clear and concise description of any alternative solutions or features you've considered.

Additional context: Add any other context or screenshots about the feature request here.

matthewei commented 4 months ago

Please assign this PR to me if you think that is necessay for kubevirt project.

xpivarc commented 4 months ago

@machadovilaca thoughts? I am wondering if this is best practice or the exporter per cluster should enrich the metrics

matthewei commented 4 months ago

Even though, I think we should also need this UID just as kubernetes' pod. What do you think?

machadovilaca commented 4 months ago

You could use the pair {namespace, name} to avoid conflicts of VMs names between different namespaces But I see that, for example, kube-state-metrics also the uid in it's metrics.

It's fine for me to add it.

I would suggest waiting for #11601 to get merged. After it goes in, should be simple to add a new label from the VMI UID in https://github.com/kubevirt/kubevirt/blob/cf5aabb0d4dac9f96105ad99a28eb1311009d74a/pkg/monitoring/metrics/virt-handler/domainstats/domainstats.go#L60

matthewei commented 4 months ago

yes, I want to work on it. /assign

matthewei commented 4 months ago

/assign

kubevirt-bot commented 1 month ago

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

/lifecycle stale

kubevirt-bot commented 2 weeks ago

Stale issues rot after 30d of inactivity. Mark the issue as fresh with /remove-lifecycle rotten. Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

/lifecycle rotten