[icinga-devel] [Icinga-devel] Review & IDOUTILS (trying SQLite)

Michael Friedrich michael.friedrich at univie.ac.at
Fri Jul 31 03:31:18 CEST 2009

Hi there,

it's been a while, but right now I am very thankful your webserver is 
back again ;-)

I have been working on an deprecated solution for getting Postgres to 
work - it does, of course, but doesn't fulfill every RDBM, only MySQL - 
Postgres wasn't successful - and has some buffer issues.

Currently I am trying to rewrite each query (ca. 50) to fit for each 
database scheme. Therefore I have created a new file named 
dbqueries.c/.h to remove the queries (just now only update/inserT) from 
dbhanderl.c and getting functions called to decide which rdbm should be 

It is more work than expected, but current status is about 40%, as you 
may review in the source code: 

I would be very happy if someone could review it while I am working - I 
am quite a Postgres-noob, concerning the fact that there is no UPSERT or 
MERGE in Postgres - is there something like a procedure, or do we have 
to try UPDATE and on not successfull, an INSERT?

Any help much appreciated!

Kind regards,

mareadmin wrote:
> Hi there,
> just done a setup from incinga.git, trying to 
> get it working in the first step and then,
> afterwards, trying to come as close as possible 
> to get idoutils working with sqlite_database; well,
> in short, last step was FAIL ;-)
> you'll find the whole transcript with lots of 
> command_line_outputs from configure and make and
> so on here: http://www.mare-system.de/dev/icinga_installation.html
> installtion-machien was an actual blank debian5 with lamp and
> nagios-plugins/nrpe installed. 
> - additional installed software:
> aptitude install libgd2 libgd-dev   libgd-gd2-perl   libgd-graph-perl  libgd-tools 
> aptitude install libgd2-xpm-dev  libgd2 
> aptitude install libdbi0-dev  libdbi0 libdbd-mysql  libdbd-sqlite3   libdbd-odbc-perl libdbd-pgsql
> aptitude install libembperl-perl
> - because i had time today to lurk here:
> groupadd  icinga
> sudo useradd -g icinga  -m icinga
> - configuring with –enable-embedded-perl failed (installing 
>   libembperl-perl doesnt work), so i used the following configuring options: 
> ./configure --prefix=$HOME/icinga_devel --disable-statuswrl --enable-nanosleep \
>    --enable-event-broker  --enable-idoutils 
> make all
> sudo make install && sudo make install-init && sudo make install-commandmode && sudo make install-idoutils && sudo make install-config
> - no problems so far, beside some backup_copies in left in installdir/etc/*.*~ 
>   after a new installation
> - apache_conf from src_dir/sample-config/httpd.conf is NOT installed during any
>   make_stuff (SHOULD), so copied to /etc/apache2/confd && apache_restart
> - install_dir/etc/htpasswd.users is not present (SHOULD) after installation;
>   created file an added icingaadmin / password to it (this file shoudl be
>   there an contain some default_user/password , like icingaadmin/nagios or so)
> - login after this changes was ok (oh ... nice interface ;-)
> - last thing: moified resources.conf and changed $USER1$ to an actual existing
>   plugin_directory, et voila,! everythin is green now
> that was part one of installation, beside some little bugs which could be 
> done easily, no problems
> part 2 was trying to get sqlite work as a database-backend for idoutils, or 
> at least try to come as far as possible
> at first i changed mysql.sql,which was no so tricky, to work with a
> sqlite_database; next steps was trying to get ido2db working; 
> running as icinga_user bin/ido2db -c etc/ido2db.cfg from icinga_install_dir 
> works so far, but db_servertype=sqlite will not work ... 
> from ido2db.c / line 332ff
> 	else if(!strcmp(var,"db_servertype")){
> 		if(!strcmp(val,"mysql"))
> 			ndo2db_db_settings.server_type=NDO2DB_DBSERVER_MYSQL;
> 		else if(!strcmp(val,"pgsql"))
> 			ndo2db_db_settings.server_type=NDO2DB_DBSERVER_PGSQL;
> 		else
> 			return NDO_ERROR;
> 	        }
> at least, no other database-backend than mysql/pgsql implemented
> yet, and since sqlite is a file_based bms and not server/client_based
> the source of at least ido2db.c has to be modified 
> so far, so good. 
> if no one cries HERE!! I DID IT i'll check ido2db/postgres next time
> Markus Manzke
> MARE System Kiel   .:.   http://www.mare-system.de
> ------------------------------------------------------------------------------
> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
> production scanning environment may not be a perfect world - but thanks to
> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
> Series Scanner you'll get full speed at 300 dpi even with all image 
> processing features enabled. http://p.sf.net/sfu/kodak-com
> _______________________________________________
> Icinga-devel mailing list
> Icinga-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/icinga-devel

More information about the icinga-devel mailing list