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
Monthly Archives: August 2015
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: 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: 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
Red Hat Satellite 6.1 officially shipped
I`m glad to announce that Red Hat yesterday officially shipped Satellite 6.1. For more information please refer to the following links:
Python: Get current date and time
To get current date and time Python offers “datetime”. To format the output according to your needs you can use “strftime”, otherwise a month would for example be shown as 8 instead of 08.
1 2 3 4 5 6 7 8 9 |
#!/usr/bin/python from datetime import datetime i = datetime.now() print str(i) print i.strftime('%Y/%m/%d %H:%M:%S') |
Sample outputs:
1 2 |
2015-08-13 08:15:30.495228 2015/08/13 08:15:30 |