VMS Information / Inventory

assran666

New Member
Apr 6, 2021
2
0
1
29
Hi All,

I have an environment with ProxMox and need to extract information on VMS : VCPU, RAM, storage, ...

I would like to run something equivalent as RvTools/LiveOptics from Dell but it doesn't work ...

Do you how can I easily have an inventory on the ressources that my VMs is consuming ?

Thank in advance for your help.
 
Hmm, you could check the API for an overview: https://pve.proxmox.com/pve-docs/api-viewer/index.html#/cluster/resources
Then there is the possibility to send some metrics to an external server: https://pve.proxmox.com/pve-docs/pve-admin-guide.html#external_metric_server

If you need to fetch the VMs config, you can do so either via the CLI (qm config <vmid>) or the API. For VMs: https://pve.proxmox.com/pve-docs/api-viewer/index.html#/nodes/{node}/qemu/{vmid}/config
For containers: https://pve.proxmox.com/pve-docs/api-viewer/index.html#/nodes/{node}/lxc/{vmid}/config

I hope that helps you further
 
Thank you for your help.

By any chance, does a method existing to have theses information in a CSV format or excel sheet ?

Regards,
 
You will have to do the data collection and data munching to get what you need into the form you need it. If you want to interact with the API you can do so form an external machine ( https://pve.proxmox.com/wiki/Proxmox_VE_API ) or use the pvesh CLI tool for which you also see the example calls in the API viewer. pvesh does support different output formats like yaml or json which make it easier to further process the data.
https://pve.proxmox.com/pve-docs/pvesh.1.html
 
Hmm, you could check the API for an overview: https://pve.proxmox.com/pve-docs/api-viewer/index.html#/cluster/resources
Then there is the possibility to send some metrics to an external server: https://pve.proxmox.com/pve-docs/pve-admin-guide.html#external_metric_server

If you need to fetch the VMs config, you can do so either via the CLI (qm config <vmid>) or the API. For VMs: https://pve.proxmox.com/pve-docs/api-viewer/index.html#/nodes/{node}/qemu/{vmid}/config
For containers: https://pve.proxmox.com/pve-docs/api-viewer/index.html#/nodes/{node}/lxc/{vmid}/config

I hope that helps you further
Where to find information about adding some additional information to the Proxmox wiki page? I mean this https://pve.proxmox.com/wiki/External_Metric_Server link. Or how I can contact with you or some one else who can help me with this feature?
 
Where to find information about adding some additional information to the Proxmox wiki page? I mean this https://pve.proxmox.com/wiki/External_Metric_Server link. Or how I can contact with you or some one else who can help me with this feature?
This page is auto generated from the official documentation.

You can find the git repository here: https://git.proxmox.com/?p=pmg-docs.git;a=summary

If you want to contribute, please check out the Wiki page explaining the process: https://pve.proxmox.com/wiki/Developer_Documentation
 
Hello I have the same request

I wonder how to obtain in CLI the inventory that I can display in the "datacenter->search" GUI, after customizing the columns I want beeing shown.

If only we could copy the table from the GUI and then paste in excel from the datacenter->search GUI, but it is impossible to select all lines from this table.
if only promox could implement on this page an export table to CSV, it would be great too.
 
Last edited:
Hello I have the same request

I wonder how to obtain in CLI what I can obtain from the datacenter->search GUI after customizing the columns I want.

If only we could copy from the GUI and then paste in excel from the datacenter->search GUI but it is impossible to select all lines from this table.
if only promox could implement on this page an export to CSV, it would be great too.
Looks like you talk about GitOps way, but AFAIK it is not possible because some of users configure proxmox from pve cli commands which are note showing in WebUI. IMHO: Proxmox need to have one proper way for configuration or display all changes in the web interface after applying some CLI commands.
 
I wonder how to obtain in CLI what I can obtain from the datacenter->search GUI after customizing the columns I want.
Most likely by checking against the API. If you do open the development tools in your browser, you can check which API endpoint is called when you open that panel. It should be cluster/resources: https://pve.proxmox.com/pve-docs/api-viewer/index.html#/cluster/resources

You can call the API on the command line, e.g.: pvesh get cluster/resources --output-format json or from an external system, for that see https://pve.proxmox.com/wiki/Proxmox_VE_API for how the authentication works with examples using curl.

If you run pvesh with --output-format json (or json-pretty) you can use that in your tooling and filter out the fields you need. If you call the API from an external system, the return value will also be json formatted.
 
Most likely by checking against the API. If you do open the development tools in your browser, you can check which API endpoint is called when you open that panel. It should be cluster/resources: https://pve.proxmox.com/pve-docs/api-viewer/index.html#/cluster/resources

You can call the API on the command line, e.g.: pvesh get cluster/resources --output-format json or from an external system, for that see https://pve.proxmox.com/wiki/Proxmox_VE_API for how the authentication works with examples using curl.

If you run pvesh with --output-format json (or json-pretty) you can use that in your tooling and filter out the fields you need. If you call the API from an external system, the return value will also be json formatted.
I'll have a look, thanks. But really some export to csv could be really nice for some GUI tables.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!