This post originally appeared on SpilGames Engineering Blog. Robert is an Engineer at SpilGames.
At Spil Games we love OpenStack and we love metrics.
We tried to run Ceilometer in the past but we experienced performance issues. We heavily use Graphite to store metrics we thought it would be a good idea to push Ceilometer metrics into Graphite. The data is directly sent from the compute node to the graphite backend so there are no bottlenecks. The quick and dirty proof of concept code provided here works great in our environment 😉 Note that this solution ONLY offers some compute graphs and does nothing more than this.
What you get:
Per vm graphs.
e.g. cpu usage of all machines on a single hypervisor:
This installation is tested/based on SL 6 and the Icehouse RDO packages. These steps need to be done on all OpenStack hypervisors where you want graphs from.
Install the openstack-ceilometer-compute package.
- Make sure to have the rabbitmq and keystone settings configured.
- Add the graphite settings: prefix and append_hostname
rabbit_host=10.10.10.10 rabbit_userid=openstack rabbit_password=bla rabbit_virtual_host=/ os_username=ceilometer os_password=pass os_tenant_name=services os_auth_url=https://keystone.bla.com/v2.0 os_region_name=region1 [graphite] prefix = stats.whateverkeyyoulike.endwithdot. append_hostname = true #This will add the hypervisorname to the prefix
- Ad a publisher to the graphite entry points.
[ceilometer.publisher] graphite = ceilometer.publisher.graphite:GraphitePublisher
- Clone our git repo for the example pipeline.yaml and graphite publisher.
- Copy the pipeline.yaml to /etc/ceilometer/pipeline.yaml
— make sure you edit the yaml publishers to send it to the correct graphite server.
publishers: - graphite://10.10.10.10:2003
- Install the graphite publisher.
— Copy the graphite.py to /usr/lib/python2.6/site-packages/ceilometer/publisher/graphite.py
- Restart the openstack-ceilometer-compute agent
You should start seeing graphs now.
Getting it upstream
Since we already have some code we decided to put this on the web.
There is a blueprint here to get things officially upstream but there is still some discussion going on there.