Example of how to gather performance metrics/statistics?
Anyone have an example of how to gather performance metrics/statistics via the REST API?
Responses
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