Monthly Archive for July, 2009

Ode to Agavi

Closing into the 14 day rush to the next Icinga release 0.8.2, we had a moment to reflect on our coding madness. As a developer, the one thing that makes such work easier is the choice of a good framework. And that is why we take our hats off to our trusty Agavi framework.

Why Agavi? It was no hard choice. As an open source, PHP 5, object oriented framework, it met all our web interface needs.

Thanks to its very strict Model-view-controller architectural pattern, we have very clean, testable and easily extensible code. By separating user input from application actions and from the interface view, there is much less complexity in the design architecture which leads to greater flexibility and easier extension. Less complexity and not to mention PHP open Icinga to a much larger developer community.

Extensibility is also built in through its modular structure which is perfect for all the Icinga addons that will no doubt come in time. Addons can be easily integrated into the frontend, added on as modules.

Icinga Web Architecture – a home for an Addon

Icinga Web Architecture – a home for an Addon

Unlike other frameworks which restrict which components can be used, Agavi is highly flexible and leaves most implementation choices the developer. So at the end of the day we have complete control over the code. It’s independence from database abstractions and multi-language support further enhances to Icinga’s flexibility, making it accessible to diverse users.

As Agavi is an active project, we trust it can only get better. Most recently, Agavi’s improvements to its build system and its integration of the Phing (Phing is not GNU make) makes coding that bit faster. And if you notice that ever ticking counter on the right, you would understand why.

  • Share/Bookmark

Dual Head Development

Maybe you’ve already heard the news and are wondering what’s going on.

The development of Nagios NDOUtils was re-activated a few weeks ago and I now will work to support both Nagios in NDOUtils as well as the Icinga Core.

As Icinga benefits through active Nagios development, Nagios will profit through database related development from Icinga and the circle closes again.

And that’s what keeps the open source community buzzing.

  • Share/Bookmark

Playing with IDOUtils, libdbi & Oracle

First of all, since I became one of the maintainers for NDOUtils Oracle I’ve been looking forward to commit this project back to the upstream. It is a bit tricky because current code has been merged from NDOUtils 1.4.b8 (partly) and it is using a self written Library for OCI (Oracle Call Interface, liboci). Even though SQL-Queries and the DB layout are slightly modified to fit to Oracle.

Focusing resources on Icinga and IDOUtils with the best source base so far includes using the libdbi as a database abstraction layer.

libdbi

So far, libdbi is written in C and consists of two modules:

  • libdbi (API which is called from inside IDOUtils)
  • libdbi-drivers (driver modules for each RDBM desired, loaded by libdbi)

Currently, the libdbi contains stable drivers for

Not completed drivers are

Testing the Oracle driver

As a matter of fact, I wanted to test the Oracle driver and it turned out to be really “not completed”. What I did (a complete description can be found here):

First step was to download and install the Oracle Instantclient and the SDK (remote Oracle DB). Next step: Install the libdbi.  The libdbi needs to be installed first – if you try the drivers first, configure will fail because of missing dbi.h!

And the biggest part: The libdbi driver for Oracle. While the source in the tar-ball contains a typo in dbd_oracle.c the CVS snapshot had problems with automake on RHEL x64. Nice isn’t it? After having that fixed configure needs to be pointed to the Oracle lib and inc dir from Instant Client. Then I slightly modified the DB scheme (kicked the table prefix, renamed one table and all primary keys to fit the maximum of 30 characters (Oracle!)). Also hacked some C-Code into IDOUtils to be ready for the first test (only a “Hello World”-SQL-Query).

Starting IDOUtils with Oracle config, getting nice error messages and not that good memory address exceptions on the Oracle server. Meaning, the libdbi driver for Oracle doesn’t even work with one single test query :-(

Future Outlook

For that reason I have been looking forward towards another solution. Reading the libdbi mailinglists there has been a discussion about rewriting the Oracle driver with ocilib. Concerning the fact that libdbi API doesn’t even support parameter bindings (which are essential for performance) it would be very tricky to get a working solution as soon as possible.

ocilib looks very nice and is a very mature and stable project which is why we are planning to build IDOUtils with Oracle support on that base. This will be less work than a libdbi driver but also enough to implement, test, debug and hopefully release soon.

Meanwhile our focus will relay on implementing IDOUtils support for the stable libdbi drivers just as Postgres or SQLite.

If anyone reading this and having knowledge of normalizing the SQL queries feel free to contact us! It will be very much appreciated getting more DB knowledge into this project! :-)

  • Share/Bookmark

Engage on the Icinga mailing lists

Icinga at SourceforgeA lot of the communication around and about Icinga is done on the mailing lists. So whether you are a user of Icinga or you want to engage in the development process, there is a mailing list for you:

Icinga Users

The mailing list for Icinga Users covers normal questions about how to install Icinga, how to use it in your day-to-day business or for getting help about specific problems or scenarios. Just become a member of this mailing list and start asking or answering questions by sending mail to icinga-users@lists.sourceforge.net.

Icinga Developers

The icinga-devel mailing lists is your first choice if you would like to influence Icinga development in any way: If you want to share your ideas about future features, ask questions about a concrete implementation detail, offer your help or just want to know what is going to happen internally, sign up here at Sourceforge and send your mails to icinga-devel@lists.sourceforge.net.

The lists are more than happy to hear from you. But please note, that you have to become a member of the mailings lists, before you can start sending e-mail. Otherwise, the lists would be flooded with spam. However you can read the lists in the archives, without becoming a member first. Just click here for icinga-users and icinga-devel.

  • Share/Bookmark

Annoying ido2db init script

*grmpf* – is just a short word of my actual thinking.

Many people are missing a stable way to start or stop the database daemon, sometimes it doesn’t clean up the socket pipe or you have to handle different command lines to kill it of – quite annoying isn’t it?

I decided to solve this with a semi-good new init script, dealing with configure and Makefiles to create and install it in a easy to use way but… what the hell?

The IDO2DB Daemon cares about a kill signal (SIGTERM for default) but his childs, one for each client connection doesn’t. This results in waise childs reading from a deleted socket… not realy usefull.

The actual git master now has a child signal fix for ido2db and a brand new working init script.

I hope someone else is as happy as I am about this.

  • Share/Bookmark