Skip to content

Add Proxmox VE stats for VMs and LXCs#539

Open
morgendagen wants to merge 13 commits intohenrygd:mainfrom
morgendagen:feature/281-pve-stats
Open

Add Proxmox VE stats for VMs and LXCs#539
morgendagen wants to merge 13 commits intohenrygd:mainfrom
morgendagen:feature/281-pve-stats

Conversation

@morgendagen
Copy link

@morgendagen morgendagen commented Feb 8, 2025

Fixes #281

Some environment variables must be added to the agent (I will create a separate PR for beszel-docs):

  • PROXMOX_URL: url to PVE api, defaults to https://localhost:8006/api2/json
  • PROXMOX_NODE: name of proxmox node to monitor
  • PROXMOX_TOKENID: API token id, e.g. root@pam!beszel
  • PROXMOX_SECRET: API token secret

I have not looked in to minimum requirements for the API token permissions, and am currently using one with admin access to /. I will add minimum requirements to the documentation when I have figured them out.

Proxmox server certificate vertification is currently skipped. Maybe it would make sense to add this as an option using an environment variable?

@henrygd
Copy link
Owner

henrygd commented Feb 8, 2025

Thanks so much! I really appreciate your work on this.

I think skipping cert validation is fine as the default behavior since traffic should be on the same machine with scoped permissions. I can add an option for supplying a cert later.

I'm hoping to have a release out this week, then we can shoot for including this in the following release. I don't have a proxmox machine ready to test, so I need to install it on an old laptop when I have time 👍

@morgendagen
Copy link
Author

Thank you for creating Beszel, @henrygd. Agree on the certificate verification and release schedule.

Since Beszel is currently showing stats for a single computer, I have added a PROXMOX_NODE environment variable that must be set to the node's name in order to only show stats for a single proxmox node - I figured this would make most sense.

CPU stats did not take in to account the number of CPUs assigned to the VM or LXC. This results in graphs where the system's CPU stat will show one set of values whereas the Proxmox CPU stats may show much larger values. I believe this should be normalised so that the two graphs can be compared. I have pushed a fix for this as well.

@kamilkosek
Copy link

Hi @morgendagen , I think the PVEAuditor role with propagation on the top level should be enough.
image

@morgendagen
Copy link
Author

Hi @morgendagen , I think the PVEAuditor role with propagation on the top level should be enough.

Thank you, I just tested it and it works fine.

# Conflicts:
#	beszel/internal/agent/agent.go
#	beszel/site/src/locales/ar/ar.po
#	beszel/site/src/locales/bg/bg.po
#	beszel/site/src/locales/cs/cs.po
#	beszel/site/src/locales/da/da.po
#	beszel/site/src/locales/de/de.po
#	beszel/site/src/locales/en/en.po
#	beszel/site/src/locales/es/es.po
#	beszel/site/src/locales/fa/fa.po
#	beszel/site/src/locales/fr/fr.po
#	beszel/site/src/locales/hr/hr.po
#	beszel/site/src/locales/it/it.po
#	beszel/site/src/locales/ja/ja.po
#	beszel/site/src/locales/ko/ko.po
#	beszel/site/src/locales/nl/nl.po
#	beszel/site/src/locales/pl/pl.po
#	beszel/site/src/locales/pt/pt.po
#	beszel/site/src/locales/ru/ru.po
#	beszel/site/src/locales/sl/sl.po
#	beszel/site/src/locales/sv/sv.po
#	beszel/site/src/locales/tr/tr.po
#	beszel/site/src/locales/uk/uk.po
#	beszel/site/src/locales/vi/vi.po
#	beszel/site/src/locales/zh-CN/zh-CN.po
#	beszel/site/src/locales/zh-HK/zh-HK.po
#	beszel/site/src/locales/zh/zh.po
@morgendagen morgendagen marked this pull request as ready for review March 1, 2025 15:36
@henrygd
Copy link
Owner

henrygd commented Mar 4, 2025

Sorry for the delay. Next release will likely be out tomorrow, then this and #579 are my top priorities.

Please don't worry about the conflicts if it's anything major. I can handle it when I merge.

@CrazyWolf13

This comment was marked as outdated.

@morgendagen
Copy link
Author

I really love the idea of this, is there any specific reason, one has to use ENV-vars to add a pve host and not directly via like a checkbox or another section in the add-system UI?

Thank you for the comments.

I followed the existing design where agents are configured using environment variables. I like it as is, and do not think any changes to the current agent configuration setup should be handled in this PR.

What about promox clusters? Can I specifiy multiple nodes?

As I see it beszel is focused on single-computer statistics, which is why you need to specify a node. But this restriction could easily be lifted. I will let @henrygd decide.

Thanks!!

Happy to help :-)

@CrazyWolf13

This comment was marked as off-topic.

@CrazyWolf13
Copy link

@henrygd
Hi
any news on this PR?

@henrygd
Copy link
Owner

henrygd commented Apr 25, 2025

@CrazyWolf13 Please see here: #579 (comment) I haven't had much time recently but there will be another release very soon. After that I'll probably disable notifications and focus on these two PRs until I get them merged.

@lotamaster
Copy link

this would be amazing - anything I can do to help get this across the finish line?

@henrygd henrygd moved this from Next to In Progress in Beszel Roadmap Jul 31, 2025
@RealFascinated
Copy link

This would be very nice to see implemented :)

@github-actions github-actions bot added the Stale label Oct 2, 2025
@github-actions github-actions bot closed this Oct 9, 2025
@github-project-automation github-project-automation bot moved this from In Progress to Done in Beszel Roadmap Oct 9, 2025
@henrygd henrygd reopened this Oct 9, 2025
@henrygd henrygd moved this from Done to In Progress in Beszel Roadmap Oct 9, 2025
@github-actions github-actions bot removed the Stale label Oct 10, 2025
@AuthorShin
Copy link
Contributor

AuthorShin commented Oct 30, 2025

With this are we pushing for something like Pulse?

@henrygd
Copy link
Owner

henrygd commented Oct 30, 2025

@AuthorShin That's a cool project. This will be a little more basic (at least initially).

I apologize again for taking so long with this. I have not forgotten about it.

@dzidulajubilee
Copy link

I wonder why this is taking so long, @henrygd , I was beginning to think you forgot about this.

@weeebdev
Copy link

Just pinging to check if the PR still matters. I'd love this to be merged, as I do not want to setup Pulse across the whole pmx cluster.

@henrygd
Copy link
Owner

henrygd commented Dec 18, 2025

Got myself a mini PC for Christmas to use as a dedicated Proxmox machine. So I'll try to get this finished at some point in January. Sorry again for the wait!

@SeaweedbrainCY
Copy link

Please, don't apologize, your work is astonishing.

I believe we are many people in the Beszel community using proxmox, do not hesitate to ping if you need some beta testers on proxmox !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

[Feature Request] Add PVE stats for VMs and LXCs

10 participants