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

lxd_containers and lxd_vms metrics are not showing in lxc query /1.0/metrics #13217

Closed
simondeziel opened this issue Mar 26, 2024 · 2 comments · Fixed by #13222
Closed

lxd_containers and lxd_vms metrics are not showing in lxc query /1.0/metrics #13217

simondeziel opened this issue Mar 26, 2024 · 2 comments · Fixed by #13222
Assignees
Labels
Bug Confirmed to be a bug
Milestone

Comments

@simondeziel
Copy link
Member

#12639 is to be partly reverted to stop trying to expose metrics about offline instances and while doing so, it'd be great to fix the metrics for lxd_containers and lxd_vms which are not showing:

$ lxc query /1.0/metrics | grep -E '\^lxd_(containers|vms)'

@tomponline tomponline added the Bug Confirmed to be a bug label Mar 26, 2024
@tomponline tomponline added this to the lxd-6.1 milestone Mar 26, 2024
@simondeziel
Copy link
Member Author

simondeziel commented Mar 26, 2024

#12775 should be kept in mind, I think.

An unrestricted metrics cert should for example get those:

lxd_containers{project="default"} X1
lxd_containers{project="foo"} Y1
lxd_vms{project="default"} X2
lxd_vms{project="foo"} Y2

While a metrics cert restricted to project foo should only get:

lxd_containers{project="foo"} Y1
lxd_vms{project="foo"} Y2

@roosterfish
Copy link
Contributor

On latest/edge it looks that when using OIDC authentication on /1.0/metrics the response doesn't contain any samples only their descriptions starting with # ....

As part of #13214 I was trying to validate the permission and have reworked the sample filtering. This seems to fix the problem.

@tomponline tomponline changed the title lxd_containers and lxd_vms metrics are now showing in lxc query /1.0/metrics lxd_containers and lxd_vms metrics are not showing in lxc query /1.0/metrics Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Confirmed to be a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants