Comments 3 Posted In Red Hat Virtualization Example of how to gather performance metrics/statistics? Latest response 2011-12-30T14:15:46+00:00 Anyone have an example of how to gather performance metrics/statistics via the REST API? SD Started 2011-12-28T20:23:30+00:00 by Schorschi Decker Pro 427 points Log in to join the conversation Responses Sort By Oldest Sort By Newest rh Red Hat Guru 1569 points 29 December 2011 3:12 PM rhn-support-simon 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: http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Virtualization/3.0/html/Administration_Guide/chap-RHEV_Reports.html 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 SD Pro 427 points 30 December 2011 2:39 AM Schorschi Decker 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. AC Red Hat Active Contributor 245 points 30 December 2011 2:15 PM Andrew Cathrow 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.