Example of how to gather performance metrics/statistics?

Latest response

Anyone have an example of how to gather performance metrics/statistics via the REST API?


Using the API you'll just get the current run time statistics, this is good for monitoring current parameters in order to script actions around these for example create your own load balancing.


Example for VM statistics:

Get all VM list:


curl -v -k -u admin@internal:password -H "Content-type: application/xml" 'https://my_server_fqdn:8443/api/vms'


Per VM the stats are:

curl -v -k -u admin@internal:password -H "Content-type: application/xml" 'https://my_server_fqdn:8443/api/vms/...vmid here.../statistics/'

The above should be scripted properly to be efficient. I've provided a command line example on purpuse to avoid a specific scripting language.


If you need monitoring then I would recommend that you'll install the data warehouse and the reporting user interface. Then you'll be able either use your own reports generating tools by direct querying the history database or use the 25 pre-configured reports, or even create your own ad-hoc reports


Full description of these can be found at:



And the history database schemas are at http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Virtualization/3.0/html/Administration_Guide/Reports_Schema.html

Thanks.  This is close to what is needed.  We have a repository and analysis solution already for our enterprise, so really just need the stream of metrics we can tap.  I am not thrilled with how the REST API reports everything as XML and having to use UUID ids for everything, level after level deep, but no API is perfect.  The metrics visible are not as extensive as Hyper-V or VMware vSphere, but figure that gap will close over time as RHEV matures.

If you could let us know some of the other metrics your interested in. As Simon mentioned there is also the datawarehouse which holds statistics aggregated over time.