Search code examples
openstackcpu-usagemetrics

Get OpenStack Virtual Machine Metrics


I have some clusters of virtual machines running on the OpenStack cloud. I want to be able to get each machine's resource usage metrics. I am looking for an effective way to do this, especially through an API.

I have used Glances (a cross-platform monitoring tool), however as far as I know it doesn't fit my requirement because virtual machines will be created on the fly, so there is no way to include the IP address of a new virtual machine to glances config (I am open to ideas on doing that if anyone knows how I can do it).

So I am thinking of creating an API that can run regularly, then send a "GET" request to get metrics at a regular interval. The challenge with this is, I do not know what the content of the API should be. really, I would love an already existing API that I can just deploy into the machines. I am using C# for programming.


Solution

  • Ceilometer and Gnocchi are what you are looking for:

    The Ceilometer project is a data collection service that provides the ability to normalise and transform data across all current OpenStack core components with work underway to support future OpenStack components.

    Ceilometer is a component of the Telemetry project. Its data can be used to provide customer billing, resource tracking, and alarming capabilities across all OpenStack core components.

    Gnocchi is the project name of a TDBaaS (Time Series Database as a Service) project started under the Ceilometer programme umbrella.

    Both Ceilometer and Gnocchi actually offer APIs for the retrieval of metrics. Please take a look in the following links:

    I hope this addresses your question properly.