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

aggregate label is problematic for hosts which belong to multiple aggregates #127

Open
Vultaire opened this issue Dec 12, 2023 · 0 comments

Comments

@Vultaire
Copy link

We've found an issue regarding metrics, observed concretely on the hypervisor_schedulable_instances metric but likely affecting others, where a metric only shows up under one of the aggregates that a host is a part of.

For example, if a host is part of aggregates a, b, and c, if I were to search for hypervisor_schedulable_instances{hypervisor_hostname="my-host.example.com"}, I might get output that looks like:

Key Value
hypervisor_schedulable_instances{aggregate="a", arch="x86_64", cloud="my-cloud", hypervisor_hostname="my-host.example.com"} 175

That is - it would give me a single record indicating 175 schedulable instances on my host. However, it would only show the record under aggregate "a". If I were to change my query to sum/avg over aggregates "b" or "c", the above record wouldn't even be included in the calculation.

I'm not a Prometheus guru so I don't have a suggestion for how to correct this in a sane way; adding duplicate records with different aggregate labels would mess up sum()/avg() over the entire collection, but I am not sure of how else to correct this... Or should per-aggregate metrics be collected in some alternative way? I don't know; I leave that for you to review and consider.

Thank you.

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

No branches or pull requests

1 participant