Ceilometer API, Net::OpenStack::Ceilometer

A couple of weeks ago, I agreed to give a talk at Infrastructure.Next about the Ceilometer component of OpenStack. Immediately afterwards, I regretted this, simply because I'm not exactly an expert on Ceilometer. But I've often said that the best way to learn something is to teach it, and what better way to learn about Ceilometer than prepare a presentation about it.

I also find that the folks with the in-depth technical knowledge of a subject might not be the right ones to give intro talks, because they tend to get into the weeds before their audience can get a big picture.

And so I started on a quest to understand Ceilometer, get some basic reporting working, and put together a howto style presentation on reporting with Ceilometer.

It turns out that several things worked very strongly in my favor:

* Ceilometer is installed and enabled by default when you install RDO. So there was no difficulty in getting it installed and configured.

* The documentation has lots of examples in it, and the API works exactly as documented.

* My presentation is only a half hour, rather than the hour that I initially thought it was, so I ended up having to trim the content, rather than come up with additional examples.

Along the way, I got tired of trying to issue HTTP API requests from the command line, and parse the response. Being a Perl guy, I started to write some perl code around this, and before I knew it, I had a full module to do all of the stuff that I wanted for my presentation.

It's up on Github at https://github.com/rbowen/NetOpenStackCeilometer and I expect I'll put it on CPAN eventually, once it stabilizes a little. In particular, the statistics() method lacks a lot of the capabilities of Ceilometer's statistics functionality, and does only what I needed for my talk. Also the interface is kind of icky.

I should note that there are some other OpenStack modules already on CPAN, and this one takes a very different approach. This is the main reason I haven't put this on CPAN yet. The other modules, by Naveed Massjouni, use Moose, and I have not yet used Moose for anything. I'm reluctant to put my stuff on CPAN while it uses such a different approach.

Patches welcome. I'd love to hear if you find this at all useful.

Come see me at Infrastructure.Next.


0 Responses to Ceilometer API, Net::OpenStack::Ceilometer

  1. There are currently no comments.

Leave a Reply





About

Some people are heroes. And some people jot down notes. Sometimes, they're the same person. (The Truth. Terry Pratchett)