HPE Morpheus Enterprise
1830178 Members
2188 Online
109999 Solutions
New Discussion

Get host/compute(vm) performance data via api

 
Not applicable

Get host/compute(vm) performance data via api

Hi everyone, I’m developing with the API and had a quick question.

How can I retrieve performance metrics like CPU, memory, and disk usage via API?
I’d like to get real-time or recent performance stats in percentage form, similar to what’s shown on the dashboard or UI.

Any guidance or example endpoints would be appreciated!

Thanks in advance.

1 REPLY 1
tyboyd
Trusted Contributor

Re: Get host/compute(vm) performance data via api

If you mean metrics from a VM you can use the /api/servers/id endpoint

There is a stats section in the return.

If you wanted to get a percent of memory uses you could take usedMemory/maxMemory

You can do the same for storage, and cpuUsage is already in the format you want.

If you mean of a Morpheus app node look at /api/health