OpenStack Ceilometer: Monthly Report Usage Script

In a customer project dealing with RHEL OSP 6 I was asked to create a script to generate a CSV file on a monthly basis to collect statistics for each instance running in a project regardless if the status of an instance is active, shut off or deleted. The Python script uses Python Ceilometerclient and Python Keystoneclient.
Continue reading OpenStack Ceilometer: Monthly Report Usage Script

OpenStack Ceilometer: Getting hardware related data from Nova compute nodes via SNMP

To get hardware related data from your Nova compute nodes you can configure SNMP on you compute nodes to store SNMP data in Ceilometer. If you need such data you first need to make sure to install the following packages on your Nova compute nodes:
Continue reading OpenStack Ceilometer: Getting hardware related data from Nova compute nodes via SNMP

OpenStack Ceilometer: Extend time Ceilometer stores samples in MongoDB database

By default Ceilometer stores data for five days in the MongoDB. To extend the time please change the following value in “/etc/ceilometer/ceilometer.conf” on all your controller nodes:
Continue reading OpenStack Ceilometer: Extend time Ceilometer stores samples in MongoDB database

OpenStack Ceilometer: Getting statistics for vcpus, memory, disk.root.size, disk.ephemeral.size

By default you wont`t get statistics for these meters. To get appropriate statistics you need to configure /etc/nova/nova.conf in the [DEFAULT] section on all your Nova compute nodes as follows:
Continue reading OpenStack Ceilometer: Getting statistics for vcpus, memory, disk.root.size, disk.ephemeral.size

RHEL OSP 6 Juno: Find out on which controller a tenant router is currently running

On RHEL OSP 6 Juno it`s a bit tricky to find out on which OSP controller the Pacemaker router service for a specific tenant is currently running on. It might be that all routers are running on the same controller but it also can happen that every tenant specific router is running on a different controller node. Continue reading RHEL OSP 6 Juno: Find out on which controller a tenant router is currently running

Configure VNC console through Horizon in HA environment the right way

This article shortly describes how to configure the VNC console access to OpenStack instances through Horizon in a high-availability environment. This configuration is currently valid for OpenStack Juno or RHEL OSP 6. If you change these settings after you already deployed instances in your environment theses changes only takes effect for instances which are created AFTER your changes described here. Continue reading Configure VNC console through Horizon in HA environment the right way

Foreman Template writing

Foreman uses common ERB style templating. Foreman templates consists of a mixture of Bash scripts and appropriate macros and functions. You can find a list of built-in macros and functions here. Within such macro you can use further Ruby code. For example to extract the last digits og an IP address you can use the following macro:

LAST_DIGIT=< %=@host.ip.to_s.split('.')[-1]%>

Where @host.ip is a built-in macro in Foreman (see link above), to_s is Ruby code and means “convert into string”, split wherever you find a “.” and read the output reverse and take the last value (“-1”).

If you want to check if a template will render correctly for an appropriate host you can open your template in your browser:

https:///unattended/provision?spoof='ip-of-a-host-you-want-to-provision'