Installing Cassandra DB for collecting vCD 9.0 Metrics Data

By | 04/10/2017

Cassandra DB is needed for capturing and storing vCloud Director metrics data so that it can be displayed in portal to end users so that users are aware of VM resource utilization etc.

Prior to vCD v9.0, we needed kairosdb + cassandra together for capturing and storing the metrics data, but things have changed now. VMware has removed the requirement of kairosdb and now metrics data can be sent straight to cassandra database.  This metric data in turn can be viewed in tenant UI.

As per vCD 9.0 documentation 

Cassandra is an open source database that you can use to provide the backing store for a scalable, high-performance solution for collecting time series data like virtual machine metrics. If you want vCloud Director to support retrieval of historic metrics from virtual machines, you must install and configure a Cassandra cluster and use the cell-management-tool to connect the cluster to vCloud Director. Retrieval of current metrics does not require optional database software.

If you are new to Cassandra, then In past I have wrote some blog posts about cassandra architecture and how it works. Feel free to read those posts from below links:

1:Introduction to cassandra

2: Understanding Cassandra Read/Write Mechanism

3: Installing Cassandra on RHEL6

In production you may want a Cassandra cluster with minimum 3-4 nodes, but in lab environment 1 or two nodes is sufficient. In my lab I am running only two node. I am configuring Cassandra on my CentOS 6 box.

vCD 9.0 needs Cassandra version 2.2.6 which can be downloaded from here

Before installing cassandra, we need to install jdk 1.7 or later and set the JAVA_HOME variable. Instructions for this is covered in blog link given above. Although the same blog have steps for installing cassandra, I am including the steps here as well.

Follow below steps for a successful installation of cassandra.

1: Create cassandra user with sudo permissions.

You can use below script which will create a user on server with sudo permissions.

2: Verify presence of cassandra user/group

3: Extract cassandra zip file and setup cassandra directory structure

4: Set ownership of directories to cassandra

5: Create script for installing cassandra as a service

Create a file named cassandra with below contents:

6: Add cassandra to chkconfig 

7: Modify cassandra.yaml file as shown below

8: Start Cassandra service 

Now cassandra node is configured. Next is to configure vCD to send metrics data to cassandra. We will discuss this in Next post. 

I hope you find this post informational. Feel free to share this on social media if it is worth sharing. Be sociable 🙂

Category: vCloud Director

About Alex Hunt

Hi All I am Manish Jha. I am currently working in OVH US as Operations Support Engineer (vCloud Air Operations). I have around 7 Years of IT experience and have exposure on VMware vSphere, vCloud Director,vSphere Replication, vRealize Automation, NSX and RHEL. If you find any post informational to you please press like and share it across social media and leave your comments if you want to discuss further on any post. Disclaimer: All the information on this website is published in good faith and for general information purpose only. I don’t make any warranties about the completeness, reliability and accuracy of this information. Any action you take upon the information you find on this blog is strictly at your own risk. The Views and opinions published on this blog are my own and not the opinions of my employer or any of the vendors of the product discussed.