Use collectd plugin for custom metrics
Abiquo supports collectd ( collectd) with an integration in the multi-cloud platform to enable you to easily work with custom VM monitoring and metrics in public cloud providers, including Amazon, Azure, and Google Cloud, as well as VMware vCenter.
In the Abiquo multi-cloud platform you can create alerts (see Manage alerts) and automation (see Manage action plans ) based on your custom metrics. For example, you can automatically scale out your VMs based on your application metrics. See Manage scaling groups
After you configure collectd and the Abiquo collectd plugin, the plugin will automatically push the values from collectd to the Abiquo API (see https://wiki.abiquo.com/api/latest/) using the Abiquo API endpoints for collectd. For example, for a VM, or a group of VMs in a virtual appliance, or for a scaling group.
The Abiquo API then pushes the collectd metrics to the Configure VM monitoring and metrics . Users can then display metrics through the UI or use them for automation.
How to install and configure collected for VMs in Abiquo
The following steps are a general guide:
In Abiquo, create an OAuth application in Abiquo for collectd. See Add an application for OAuth
Assign the privilege to
Allow user to push own metrics
Install collectd on your VM
Install the Abiquo collectd plugin from source (or using automation an automation similar to the example shown in the Abiquo Chef cookbook).
Configure the Abiquo API path to push the metrics to the VM in Abiquo. Check the correct format of the API path in the Abiquo API documentation
Configure your metrics in collectd
The Abiquo collectd plugin will automatically push all collectd metrics to the Abiquo API in PUTVAL JSON format.
To display the VM metrics in Abiquo:
Edit your VM and go to Monitoring
Select Fetch metrics data.
Optionally select the monitoring level on providers that support it, e.g. AWS
Select the metrics to display from the custom metrics and the built-in metrics of the cloud provider or hypervisor
Edit a VM and Select VM metrics to displaySave your changes to the VM. Optionally, define a scaling group to increase the number of VMs running your application automatic scaling actions. See Manage scaling groups
If your VM is not running, deploy to launch the VM. Wait several minutes for the server to return metrics
On the VM icon near the top right corner, click the metrics symbol.
Or in the Virtual appliance, go to Monitoring → Virtual machinesConfigure the metrics to display the required statistic, frequency, dimensions, and so on.
The platform will display the configured metrics.
Create alarms to set metric thresholds and alerts on groups of alarms, to notify or respond to changing application conditions with automation using action plans. See Cloud VM automation guide
Automate the install of collectd using Chef
This is an example use case with Chef using the Abiquo Chef cookbook.
In Abiquo, the administrator creates an OAuth application in Abiquo for collectd. See Add an application for OAuth
Assign the privilege to “Allow user to push own metrics”
On the Chef server, the administrator creates a role with the following:
The monitoring recipes to install the Abiquo collectd plugin
The OAuth tokens for the application configured
In Abiquo, users edit the VM and go to Chef, then select the appropriate collectd role.
Abiquo recommends this kind of automation because the OAuth application belongs to the tenant administrator. This means that the administrator prepares the configuration for users, it is easy to apply it automatically on a large scale, and the administrator can protect the configuration from accidental changes when users load their own Chef recipes, etc.
Related links
Collectd website: collectd
Abiquo-collectd plugin: GitHub - abiquo/collectd-abiquo: Collectd Plugin for Abiquo
Abiquo Chef cookbook for the collectd plugin: GitHub - abiquo/collectd-abiquo-cookbook: Chef cookbook to install the Abiquo collectd plugin
Abiquo API documentation of VM resource: VirtualMachinesResource
Push collected data to a VM: Abiquo API Reference
Example collectd metrics push: POST_cld_vdcs_X_vapps_X_vms_X_collectd_CT_app_j
API how to for working with metrics: https://abiquo.atlassian.net/wiki/spaces/doc/pages/311368001
Example collectd data object
Here is an example of a data entity to update a virtual machine with the collectd metrics specification.
Custom metrics entities
Custom metrics display in the UI
Display custom metrics for a virtual appliance
Abiquo can display custom metrics for your virtual appliance and metrics for the group of VMs in the virtual appliance.
To display custom metrics for the virtual appliance:
On a Virtual appliance card, click the Monitoring button OR
Open a Virtual appliance and go to Monitoring tab → Virtual appliance metrics page.
To configure the display of metrics:
For the refresh interval, select the Refresh data every checkbox and enter a number of minutes.
To filter metric statistics, click on the Filter button and select the granularity, statistic, time frame, and dimension, as required.
Copyright © 2006-2024, Abiquo Holdings SL. All rights reserved