Archive for the 'Releases' Category

Page 2 of 2

Icinga IDOUtils will support Oracle RDBM in 1.0 RC

Hi there,

work was not getting better and getting Oracle to work was on hold. So I decided to push a night of coding after I had prepared the MERGE queries.

And yes, it was successful – initial support for Oracle is done!

Oracle driver requirements

You”ll catch the problems with libdbi and Oracle in older blog posts. The new driver proposed by myself was ocilib, developed by Vincent Rogier. Currently it’s kind of a break up, so you need to have the libdbi installed and then install ocilib as an add-on (and Oracle libs and includes i.e. the Oracle Instant Client). As far as I know ocilib is not in the repositories right now so get the latest version and compile them yourself (documentation is really good!).

Modifying Configure for Oracle

If you enable IDOUtils during configure you now have the opportunity to use the flag –enable-oracle – if you didn’t install ocilib to default path /usr/local/ [lib/include] you can use

--with-ocilib-lib=/path/to/ocilib/lib
--with-ocilib-inc=/path/to/ocilib/include

to point configure to ocilib. It will be linked at runtime so you do not need to tell configure where $ORACLE_HOME and $LD_LIBRARY_PATH relays. Configure will output the following

  • export LD_LIBRARY_PATH in ido2db Initscript where ocilib resides (OCI_IMPORT_RUNTIME)
  • enable #define USE_ORACLE and ocilib.h for the compiler
  • create ido2db.cfg-sample with Oracle support

After that you can perform a normal install.

Whencompiling the code  it heavily depends on #define USE_ORACLE – if you plan to change back to another RDBM using libdbi you’ll have to issue
# make distclean
# make clean
# ./configure --enable-idoutils

Oracle Database Setup

In module/idoutils/db/ you will find oracle.sql and oracle-drop.sql. The first one creates the table definitions, a time conversion function and all the triggers and sequences needed for commonly used insert ids. oracle-drop.sql is just for testing purposes and cleans the database scheme.
Make sure you setup the Oracle DB with an appropriate scheme with username/password. Then copy oracle.sql to your $ORACLE_HOME at the db server and import it e.g. by using sqlplus
# su - oracle
$ sqlplus dbuser/dbpass
SQL> @oracle.sql

Then edit your ido2db.cfg for using Oracle. Please note that Oracle ignores the db_host, instead point db_name to //DBSERVER/DBNAME

db_servertype=oracle
db_port=1521
db_user=icinga
db_pass=icinga

That should do the trick. If you are experiencing problems turn the debug_level=-1 and debug_verbosity=2 and make sure the max_debug_file_size is set to at least 100 MB – the improved debug output will put a lot of output into that file.

Changes to the code

The biggest part has been done already getting Postgres to work – rewrite the INSERT OR UPDATE queries and extract the unique constraints for UPDATE conditions. Those queries have been adapted to use the MERGE trick. Some queries tried to issue an UPDATE where the unique constraint contained a value to be updated too. That failed heavily but introduces a really nice feature of ocilib.

By using OCI_Initialize it is possible to register an error handler function. This function simply gets the last OCI error and writes that to syslog and debug output. So it is really easy to find out why queries will fail and the nice thing is – the function doesn’t need to be called everywhere, just register it to ocilib.

Another heavy task was getting the insert id – MySQL supports last_insert_id but Postgres and Oracle don’t. In Postgres it’s rather easy defining the PK as SERIAL and getting the sequence id in order to get the last insert id. For Oracle, there are several ON INSERT TRIGGERs defined in oracle.sql which auto increment the id (primary key). Given that a specified function reads that values from the opened session.

Simply said, you do the following for an Oracle DB query in IDOUtils

  • OCI_Initialize(ido2db_ocilib_err_handler, NULL, OCI_ENV_DEFAULT)
  • oci_connection = OCI_ConnectionCreate(dbname,username, password, OCI_SESSION_DEFAULT);
  • oci_statement = OCI_StatementCreate(oci_connection);
  • OCI_ExecuteStmt(oci_statement, MT(“SELECT * FROM ….”));
  • OCI_Commit(oci_connection);
  • oci_resultset = OCI_GetResultset(oci_statement);
  • instance_id = OCI_GetUnsignedInt(idi->dbinfo.oci_resultset, 1);
  • OCI_ConnectionFree(oci_connection);
  • OCI_Cleanup();

There were some other minor and major changes to the code…

  • changed NOW() to SYSDATE
  • modify table serviceescalation_contactgroups to serviceescalationcontactgroups (30 chars max in Oracle)
  • primary key only is id anstead of [tablename]_id (30 chars max in Oracle)
  • dropped table_prefix – ido2db.cfg setting will be ignored
  • long_output uses CLOB (Character Large Object) since varchar2 supports 4000 bytes at maximum

I’ve also added a runtime version check for ocilib – if the library contains errors and does not export symbols correctly ido2db will quit correctly.

Conclusion

This is the initial version of Oracle support for Icinga IDOUtils. It was a bunch of work but there are many things to follow:

  • rewrite heavily used queries (host/service/check/status, timedevents) to prepared statements and parameter bindings
  • improve housekeeping DELETE queries with partitioned COMMITs
  • improve getting the insert ids
  • do not depend on libdbi if –enable-oracle is used

Oracle support for IDOUtils will be in Icinga 1.0 RC – watch out for the upcoming release and have fun testing! Please report any bugs or feature requests to the mailinglists and/or our dev tracker!

Many thanks to David Schmidt for implementing the first version of NDOUtils Oracle, many ideas have been improved within here. And also many many many thanks to Vincent Rogier for implementing such a great Oracle driver within the project ocilib. It is a pleasure coding based on ocilib, reading the documentation meanwhile and getting instant support for free! :-)

Since this is the third RDBM to be maintained by only 2 Core team members, please contact us if you like to participate and/or help us improving more RDBM support! :)

  • Share/Bookmark

Icinga 0.8.4 is out – bugfixes and updates for IDOUtils and Docu

Download Icinga 0.8.4

Since we decided to give you the opportunity to test the new IDOUtils with re-engineered code for more RDBMs and Postgres support too we were aware of the fact that there would have been bugfixes to apply ;-)

There were several issues to fix, not only Postgres but also typos and rewritten queries. We also added some improvements to the code, to mention configure support for manual libdbi detection and also the new version handling for IDOUtils. It’s now the same als Icinga Core, the old fashioned 1.4b8 has been dropped since we implemented a lot of new stuff to the original code.

Following the Changelog what’s been done so far:

  • idoutils: fix failure_prediction_options in tables hosts, services for postgres
  • idoutils: add configure support for manual libdbi detection
  • idoutils: fix typo laste_state (wrong column)
  • idoutils: fix buffer freeing with NAGIOS_SIZEOF_ARRAY
  • idoutils: delete old mysql files coming from ndoutils
  • idoutils: add new version handling, idomod/ido2db now shows version of Icinga core
  • idoutils: rename existing mysql/pgsql files, added upgrade/fix files
  • idoutils: fix wrong typecast in servicestatusdata_add, no more segfault while query preparing
  • idoutils: add experimental db trimming interval option in ido2db.cfg
  • core: fix wrong copyright url for Ethan
  • docu: fix quickinstall guides

Those changes and improvements to the code are worth a new release!

Thanks for testing and reporting bugs and improvements to our mailinglists, dev tracker and here in the blog! =)

PS: Concerning Oracle, I’ve started preparing the code in another branch (edit Makefile for ocilib, rewrite db connection, add parameter bindings for queries and so on). I hope this will be done within the next few weeks and maybe we’ll catch up with another Icinga release before 1.0 alpha :-)

  • Share/Bookmark

PostgreSQL supported Icinga v 0.8.3 is out

Basic RGBWe heard the call and we answered: Icinga is out with PostgreSQL support with working queries, sequences and all. Good news for users who have been looking for a Nagios based open source monitoring system which has database flexibility for not just MySQL but also Postgres. A big hand to Michael and Hendrik!
Applause should also go to Lara and Wolfgang for their hard work on the Icinga documentation, as we also have the first edition out in Docbook format.

A big release before the first Alpha in October, we hope you like it and share your thoughts with us. This version’s proof that your ideas count.

  • Share/Bookmark

Icinga 0.8.2 is released

Download IcingaAs promised, version 0.8.2 is out and ready for download. Aside from fixing a few bugs in ido2db and the function “make fullinstall” the current IDOUtils now also supports long_output. Additionally, for accelerated development, we’ve also had a go at some of the pending Nagios patches, so this version should be up to speed.

Since supporting the hot wanted other databases is a harder nut we thought it would be, we weren’t able to support PostgreSQL in this release as we hoped to but Michael is on a very good way to handle the database dependent SQL queries. May be we are able to give you an interim release before the next big 0.8.3.
As a consolation gift we have integrated the Icinga PHP API for the first time. The PHP API should be installed with a normal ‘make install’.
Feel free to test the search bar and give us feedback about that.

The next release is planned for 2 September, but in the meantime we look forward to the feedback!

  • Share/Bookmark

Icinga Demosystem updated

Together with the release of Icinga 0.8.1 yesterday, we also updated our demo system. To try Icinga without installing it, please go to http://demo.icinga.org and login with username “guest” and password “guest”.

If you have any questions or ideas, let us know on the mailing lists.

  • Share/Bookmark

Icinga 0.8.1 released

Hi there,

we are happy to inform you that the latest Icinga Release V 0.8.1 is
out right now. Just follow the download button on: http://www.icinga.org/

The next release is planned for August, 12th, 2009.

Until then feel free to contribute or provide us with feedback on the
mailing lists, helping hands and vivid minds are always very welcome.

Cheers
Your Icinga Team

  • Share/Bookmark

Icinga 0.8 for Mac OS X

We’ve just released the first beta version of Icinga and just a couple of hours later, the first version for Mac OS X is online. Thank you for this excellent work. You can download Icinga 0.8.0 for Leopard here.

P.S. There is also a Nagios Version for Mac available.

  • Share/Bookmark

Icinga v0.8.0 is out

Hello out there,

we are proud to announce the first beta release of Icinga.

As mentioned on the roadmap , we have reached the renaming goal. But is just a simple renaming takes so much time? Well, no!

It was kind of fun to re-factor the IDOUtils to use libdbi as a DB abstraction layer, that we decided to get these changes into the 0.8 release instead of holding it back to 0.8.2. Up to now it should work well with MySQL Databases and current discussions on the icinga-devel list shows that there’s enough work to change the different SQL queries to fit to more RDBMs.

Also new are some neat style sheet changes based on the Vautour Theme (Link to MonitoringExchange)

Work has just begun and we hope for many feedback, preferred on the mailings lists.

You don’t have to buy a pig in the poke, just watch the Icinga live demo on: http://demo.icinga.org/icinga/ (Username: guest; Password: guest) and if you like it, try it by yourself after downloading from Sourceforge

  • Share/Bookmark