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

Add template information #199

Closed
rpelissi opened this issue Nov 9, 2023 · 2 comments
Closed

Add template information #199

rpelissi opened this issue Nov 9, 2023 · 2 comments

Comments

@rpelissi
Copy link

rpelissi commented Nov 9, 2023

Hi!
First thanks for this beautiful exporter :)
Could you try to add the fact that a vm is in fact a template in the pve_guest_info metric?
could be useful for filters and alerts.
Let me know if you have any question.
Thanks!

@znerol
Copy link
Member

znerol commented Nov 13, 2023

That might be possible. While the official docs on the /cluster/resources endpoint do not mention it, there seems to be a template key on returned qemu records.

Running pvesh against /cluster/resources of my cluster indicates that:

# pvesh get /cluster/resources --output-format json-pretty
...
[
...
  {
     ...
     "id" : "qemu/XXXX",
     "status" : "stopped",
     "template" : 1,
     "type" : "qemu",
     "uptime" : 0,
     "vmid" : XXXX
     ...
  },
...
]

Thus, the template label can likely be added from within the ClusterResourceCollector.

Pull requests welcome.

@znerol
Copy link
Member

znerol commented Jan 3, 2024

Thanks @spearcrow. Rolled a new release including PR #208.

@znerol znerol closed this as completed Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants