Written by Marc Cirauqui, Support Engineer @ Abiquo
Abiquo enables you to use metrics from virtual machines, applications and physical host machines to drive Action Plans, which can be used to auto scale VMs in the same or another cloud (“Cloud bursting”), and to perform other actions such as sending an email, rebooting VMs, increasing VM resources and more.
In addition to collecting metrics through each hypervisor and cloud plugin’s interface (vCenter, libvirt for KVM, AWS, Azure etc.), Abiquo allows you to push custom metrics to the platform that will behave just like any other metrics. Even better, these are automatically incorporated into the Abiquo database and UI, so there’s no development or even configuration required! To simplify it even more, Abiquo API implements a parser for the collectd JSON format, so you can use collectd to push metrics into Abiquo without needing to write direct to our REST API.
Abiquo 4.4 adds the capability to push metrics not only to VMs but to other entities across the platform. This makes it possible to push metrics for a datacenter, or rack (a group of hosts in Abiquo), or hosts. When you have such metrics fed into Abiquo you will be able to create alarms and alerts based on those metrics that in turn will be able to trigger action plans.
Enterprise cloud platform admins often ask us if it’s possible to alert on physical infrastructure events, such as a rapid change to the number of VMs, or the CPU utilization of an ESX server. By pushing vCenter metrics into Abiquo, they can use Action Plans to do just that, and even to take other actions. How about stopping development VMs when the host CPU is busy? Or scaling down a less important app when too much RAM is being consumed? The possibilities are endless!
To implement this, I searched for plugins for collectd that collect metrics from vCenter, and found collectsphere. So in this blog post I’m going to install collectd in a CentOS 7 machine and configure it to collect metrics from vCenter and post them to Abiquo so they become available under a certain rack.
Ready? Here we go:
The first thing will be to make sure we have the EPEL repos available, then install collectd and git, which we will use to get the necessary collectd plugins:
Once you have that, you will need both the collectd output plugin for Abiquo and the collectsphere plugin:
Now we need to configure collectd to load these two plugins with the appropriate configurations:
This file will make collectd load the Abiquo output plugin posting metrics to a rack URL using basic auth. Note the “TypesDB” sentence is needed because collectsphere uses a custom types db. Then, to configure collectsphere:
For specifics on configuration of the collectsphere plugin please refer to the plugin documentation. Now, as this instance of collectd will be used to gather metrics from vCenter, we could edit the main config file for collectd and disable any other collection plugin, preventing this instance of collectd from pushing metrics from the host it is running in. If that host is, for example, the RS managing the datacenter, it could push its own metrics to the Abiquo datacenter, for example.
So, at this point, all that is left to do is to start the collectd daemon:
And wait some time until it gathers metrics and starts pushing them into Abiquo. After some minutes, you will be able to go to the Abiquo UI, infrastructure, Alarms tab and create alarms over the metrics you are currently gathering from vCenter!
Abiquo delivers the industry’s leading cloud orchestration software for service provider clouds; allowing customers to quickly build and monetise cloud services, whilst managing hybrid, private or public cloud infrastructure from one intuitive portal – adding value through greater efficiency, visibility, simplicity and control. Abiquo is privately held, and operates from headquarters in the UK with offices in Europe, and through its extensive global partner network. For more information, contact us.