[SOLVED] Pvesh get resources %

Sakis

Active Member
Aug 14, 2013
121
6
38
In Datacenter > Summary we have a Resources tab that give us combined percentages in % of all nodes in CPU, RAM and Storage usage.

I want to get these values with pvesh in order to create some nagios checks.

Running the following commands I can get the values somehow

CPU
pvesh get /cluster/resources
looking at cpu value. 1 is 100%
I can gather all nodes values and then calculate the general percentage.

RAM
pvesh get /cluster/resources
looking at maxmem and mem values I can calculate the % per node. Then per cluster.

Storage
This is a "bad" value. You cant give with one number the usage of all storages mounted. It simply adds all storage available in the node and sums up their usage. We will create individually checks for this matter.

So can anyone confirm that we cant get with pvesh, in one value, the combined CPU and combined RAM usage of the cluster?
 

Attachments

  • resources.png
    resources.png
    27.9 KB · Views: 10
confirmed, you have to calculate those values from the absolute values provided.
 

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!