Ceilometer transformers are part of the Ceilometer pipeline, which is the mechanism by which data is processed. In Ceilometer there is a pipeline for samples and a pipeline for events.
Configurations for these pipelines can be found in /etc/ceilometer/pipeline.yaml and /etc/ceilometer/event_pipeline.yaml.
Transformers are responsible for mutating data points and passing them to publishers that will send the data to external systems.
Different types of transformers exist to mutate different types of data. The following is a table containing all the available transformer types:
Name of transformer
Reference name for configuration
Accumulator
accumulator
Aggregator
aggregator
Arithmetic
arithmetic
Rate of change
rate_of_change
Unit conversion
unit_conversion
Delta
delta
Let's take a more detailed look into the accumulator transformer.
Ceilometer has different mechanisms to collect data from OpenStack. One of these mechanisms, are notifications, which will be explained in this post.
OpenStack Notifications
All OpenStack services (such as Nova Compute, Neutron, etc.) send notifications about executed operations or the state of the system. Many of these notifications carry information that can be metered such as CPU time of a virtual machine instance created by the compute service.
OpenStack services send these notifications through an AMQP message queue. However, not all these notifications are consumed by the Telemetry service, as the intention is only to capture the billable events and notifications that can be used for monitoring or profiling purposes. The notification agent filters by the event type. Each notification message contains the event type.
In Ceilometer, the notification agent is reponsible for consuming these notifications from the AMQP message bus, and then transforming them into events and samples.
The rails/webpacker project allows integration of Webpack with a Rails application. However, setting this up in a Cloud 9 development environment needs a few tweaks to be able to work correctly. This post explains how to achieve this.
Creating the Application
We will first create a regular Rails application and then use the webpacker gem to install Webpack.
Ruby's case statement provides some nice functionality to be used with objects and ranges. I was recently developing a small application in Ruby on Rails using blood test data where I had to check if a certain test item (i.e. HDL Cholesterol) value belonged to a certain range. I did not want to use a bunch of if statements and I actually found a pretty neat way to implement using the Ruby case.
In my application I have a Rails model called Entry which represents a blood test result with a lot of field data such as blood glucose level, blood pressure level, etc. etc. I want to display this data in the view using Bootstrap 3's nice progress bars and I want the progress bar's contextual class to be changed and determined by the range in which this data point sits in.
If we take total cholesterol as an example, a quick Google search indicates that an ideal value would be less than 200 mg/dL, a high value (not good) would be between 200-239 mg/dL, and a very high value (definitely not good) would be above 240 mg/dL.
To implement this, I created a Recommendations module under the /models directory. All classes belonging to this module will have different ranges to represent what I explained above. This is what the model directory tree looks like:
Before beginning to contribute to OpenStack, it is necessary that we setup an ideal development environment for a smoother workflow.
In this post I will cover how to setup a Devstack development environment in a Ubuntu 16.04 virtual machine using VMware Player.
Setting Up the Ubuntu Virtual Machine
Make sure you have VMware Player installed in your system. Then we need to choose an appropriate Ubuntu ISO image for our virtual machine. In my case I am using a Ubuntu Desktop 16.04.2 LTS (Xenial Xerus) for 32-bit PC i836.
In VMware Player, create a new virtual machine using the wizard. Assign your preferred amount of memory and storage space. Now start the machine, and select the Ubuntu .iso image file when prompted. Proceed with the installation and select the Erase Disk and Install Ubuntu option when prompted.
~> I tried using VirtualBox for virtualization but I could not successfully install Devstack with it. Probably due to issues on using the correct network adapter. I also tried using Ubuntu 14.04 without success as well. This is why I recommend Ubuntu 16.04.
Once the installation is finished, restart the virtual machine.