[icinga-devel] Draft - making NDOutils/Idoutils obsolete

Michael Friedrich michael.friedrich at univie.ac.at
Mon May 18 17:16:28 CEST 2009

Hi there,

mareadmin wrote the following on 18.05.2009 16:48:
> Hi out there,
> i don't know much about the internals of IDOUTILS and its 
> handling of SQL-Statements, but for me it looks like IDOUTILS
> are far more complex than it should be, since its just parsing
> some $MACRO$-stuff to a database; and parsing and handling $MACRO$s 
> is very cheap in nagios/icinga.
Since going into deep using the libdbi as abstraction layer code has 
been reworked by Hendrik.
For sure, the code isn't that simple and it will grow even more if 
non-standard queries are applied for each db IDOUtils should support.

> as far as i understood, idoutils shall store any status of any 
> host/service, any webinterface_action
> as well as startup_parameters, parsed from config_files; this stuff
> is presented via event_broker_interface / idomod and the handled over to
> ido2db to put this stuff into a database.
> maybe just the ido2db_stuff needs a rewriting, so it abstracts from the
> db, presenting plain sql_code, doing all the db_handling by the 
> libdbi.
> when its clear, how all the data is to be read from the socket, then this
> should be no problem anyway. 
Nagios/Icinga sends out the events to the defined event broker module, 
ndomod/idomod which writes onto a socket where ndo2db/ido2db reads from. 
ido2db reads and then decides what to to with the data:

* state change, do update
* new state, insert
* keep history
* housekeeping (db trimming options)
* store configuration

These things are all handled by queries and during the strictly 
normalized db structure you can have either lots of queries or lots of 
joins (insert/delete, select).

The current implementation of the ido2db currently works with mysql, 
some bugfixing and giving the user more information on errors (i.e. your 
database is not yet supported, see [1]) is still in progress.
The abstraction is so far completed, now it's the optimization and 
support-more-dbs part.
> if the aim wouldn't bee: "keeping strict compatibility with nagios"
> one could discuss about additional service/host_config_options like
> [...]
> but this would break compatibility, so there is an interface (idomod) and the
> solution is, for me, to create a db_independent ido2db that works on any db,
> speaking plain sql. 

Well this is an interesting idea though it breaks completely with nagios 
as you said. Keep this idea in mind when the ido2db works fine and 
stable and most of the bugs are fixed. I think it would be a 
nice-to-have-feature right now, but concerning the needed rework of the 
DB design this is also a good point.

> and i wouldn't like to have the db_logging_stuff done
> within the nagios_core since it will slow down/break nagios in case
> the database is slow or dead.
> until yet, i did not managed idomod to put data into data_sink ... 
> [1242656867] Icinga 0.7 starting... (PID=9881)
> [1242656867] Local time is Mon May 18 16:27:47 CEST 2009
> [1242656867] LOG VERSION: 2.0
> [1242656867] idomod: NDOMOD 1.4b8 (01-03-2009) Copyright (c) 2005-2008 Ethan Galstad (nagios at nagios.org), Copyright (c) 2009 Icinga Development Team (http://www.icinga.org))
> [1242656867] idomod: Could not open data sink!  I'll keep trying, but some output may get lost...
> [1242656867] Event broker module '/home/testo/icinga_devel/bin/idomod.o' initialized successfully.
> [1242656867] Finished daemonizing... (New PID=9882)
Did you start the ido2db process seperately _before_ starting Icinga?
What shows ps aux | grep icinga ?
Check the ido2db.cfg in /usr/local/icinga/etc/ - is the database 
information correct, did you create a mysql-user and table, and imported 
the db design from icinga-core/module/idoutils/db/mysql.sql ?

Postgre does not yet work if that is your setting... the queries are 
still the same bug as provided by the original ndoutils (where postgre 
support is a little wtf). this should hopefully be fixed after the 
initial release 0.8 of Icinga.

Kind regards,

[1] https://dev.icinga.org/issues/show/67
> Markus Manzke
> MARE System Kiel   .:.   http://www.mare-system.de
> ------------------------------------------------------------------------------
> Crystal Reports - New Free Runtime and 30 Day Trial
> Check out the new simplified licensing option that enables 
> unlimited royalty-free distribution of the report engine 
> for externally facing server and web deployment. 
> http://p.sf.net/sfu/businessobjects
> _______________________________________________
> icinga-devel mailing list
> icinga-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/icinga-devel

DI (FH) Michael Friedrich
michael.friedrich at univie.ac.at
Tel: +43 1 4277 14359

Vienna University Computer Center
Universitaetsstrasse 7 
A-1010 Vienna, Austria  

More information about the icinga-devel mailing list