Monthly Archive for October, 2009

Genotec choosing Icinga for monitoring solution!

Genotec-Icinga

With recent correspondence from Thomas Spycher of Genotec.ch, He has informed us that they (Genotec.ch) have chosen to utilise Icinga for the monitoring (appropriately 500 hosts!) of their server equipment.

Here are some extracts from a recent Blog from Thomas with his thoughts on Icinga, and how he will be implementing it throughout Genotec.ch

Original post from: netzwerk-und-server-monitoring-mit-icinga

… Icinga still is quite young but my first tests ran extremely stable. The text-based configuration is more complex but provides a lot of possibilities for automated solutions.

… First Tests were very successful and we are thinking about replacing the current productive monitoring system by icinga. Due to the great flexibility, extensions are set up extremely fast.

… That’s why Genotec doesn’t use just sms and e-mail for notification but also Prowl to push notifications directly to iphones. For documentation of outages, internal tracker items for the internal system are automatically generated. There are endless opportunities. It takes 5 minutes to set up notifications via twitter.

… Contact to the developers of Icinga is great! We and Icinga are looking forward to complete the go-live of our instance and to release the first Icinga stable. Furthermore we are confident about the teamwork with Icinga and we are sure Gentotec and Icinga can benefit from it.

… It looks like Gentoc is the first provider who relies on Icinga. I am confident this direction is the right one and I am looking forward to keep you informed about further steps of this project.

Also I have to add, Thomas informed us via twitter, that he had the released 1.0 RC1 up and running within 10 minutes of the release hitting SourceForge!

So thank you Thomas and Genotec.ch for both choosing Icinga for your monitoring solution & for making contact with us. Your feedback is encouraging for the hard working development team who have spent many hours to achieve (what  has been a remarkable job in 5 months!) the first Release Candidate of Icinga…

  • Share/Bookmark

Icinga Presentation – OSMC

Two days ago we presented the actual 1.0 Release an an early demo of the new webinterface at Open Source Monitoring Conference in Nuremberg here.

Here you can have a look on the presentation.

osmc_icinga

Demo for the alpha version will be available soon.

Nice weekend.

  • Share/Bookmark

Icinga Web 0.9.0 alpha is revealed!

Sorry for the delay on the release, we had to catch several technical issues next to OSMC.

We decided to split the releases into Icinga Core and Icinga Web. Therefore you will find two several packages to download and install.

The Core contains the Icinga API and IDOUtils which are needed for a functional Web this time. Make sure to download Icinga 1.0 RC1 and install it with IDOUtils for MySQL, the API will be installed automatically in share/icinga-api/

The Icinga Web depends on the API – you have to point the config to the actual install path. There are also several prerequisites and dependencies to resolve, so please catch on the instructions in doc/install-fromscratch.txt and do not hesitate to ask questions on the mailinglists and/or report any issues/bugs on our dev tracker.

Please keep in mind that this is an alpha release and be patient while we are working on future versions! :-)

  • Share/Bookmark

Where to get help ???

So you have just downloaded Icinga 1.0RC?  Do you need a little help in getting it configured?  Where to start looking for help? …

Here’s a list of resources to assist you in your journey…

http://docs.icinga.org/

http://www.icinga-portal.org/

http://www.monitoringexchange.org/

http://en.irc-monitor.com/Icinga

http://en.irc-monitor.com/Icinga-devel

https://lists.sourceforge.net/lists/listinfo/icinga-users

https://lists.sourceforge.net/lists/listinfo/icinga-devel

Remember that the Icinga-core is backward compatible with Nagios, so you will notice that some of the resources above have shared content.

  • Share/Bookmark

Icinga 1.0 RC1 awaits you!

The much awaited release of Icinga 1.0 RC1  is now available for download!

New features/updates implemented in this release are… (see Changelog for more detail)

  • Oracle support with oclilib
  • SSL support
  • idoutils: fix typecast bug – unsigned long is bigger then int
  • idoutils: fix oracle notif_timeperiod_object_id (30 chars max)
  • idoutils: fix oracle table serviceescalationcontactgroups (30 chars max)
  • idoutils: fix hoststatus/servicestatus/servicecheck unique constraint updating mismatch
  • idoutils: fix insert_or_update queries where update violates unique constraint
  • idoutils: remove and ignore oracle table_prefix (30 chars max)
  • idoutils: workaround to handle more than 4k Data which may exceed service outputs incl. long perf_data
  • core init: delete ’su’ usage since all previously su touched files were created by the icinga user
  • idoutils: fix unescape bug during tabstops
  • idoutils: fix idomod/icinga segfault while try to use ssl on unix sockets
  • core configure: set INIT_OPTS depending on detected host OS (no more root:root on FreeBSD?)
  • idoutils: fix case insensitive comparison in MySQL using BINARY
  • idoutils: change ido2db.cfg: ndo2db_[user|group] to ido2db_[user|group]
  • core web: fix missing gif icon copy

Please Note: if you are upgrading from an earlier release, you will need to update the user config in ido2db.cfg from ndo2db_[user|group] to ido2db_[user|group]

As always your feedback is welcome! if you have suggestions or improvements please communicate these via the icinga-devel

mailing list and should you have any trouble with installing/compiling then please use the icinga-users mailing list.

More details to follow soon about the new Icinga-web UI…

From the Icinga Team … Enjoy!

  • Share/Bookmark

Teasers, for future Web-UI

As the release of Icinga 1.0RC draws closer, here are a few more screen shots of the new web-ui…

This web ui will be available soon…

  • Share/Bookmark

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

Online documentation now availabe!

Documentation for both German & English is now available from the following link… Icinga-docs Or by selecting the upper menu as indicated in this image…

documentation

  • Share/Bookmark

13 days to go… to Icinga 1.0RC

With only 13 days to go before the first Release Candidate, There are some area’s that still need some testing before this can be classed as stable, these include IDOUtils PostgreSQL and German documentation.  To get hold of the current git branches or to just review the current changes please visit…

https://git.icinga.org/index

Its most important to test as much functionality as possible, in an attempt  to find if there are any bugs in the current code and most importantly to report any findings!

Report any issues to the following links…

Report Issue API
Report issue Core
Report Issue Docs
Report Issue Web

Once in the relevant link for the issue you are reporting, simply click on the tab “New issue”and submit you findings…

Reporting Issue

Again please assist as best you can with this,  and in doing so, you are helping in making Icinga one of the most user friendly monitoring suites!

  • Share/Bookmark

Creating custom logos

By default your service map will show your defined services with a question mark logo, this is due to  the default logos used are unknown.gif and unknown.gd2. You can define your own custom logos thus giving a more personalised look. There have been logo packs made for use with Nagios, well theses of course will work just fine in Icinga, in this case I have made my own custom images of my router and my server.

The image types can be .jpg, .gif .png you will also need to convert the images you use to a .gd2 format as well. to do this you are going to need the pngtogd2 utility. (see notes below) I have resized these images to 40×40 pixels before conversion to .gd2 format.

pngtogd2 source_image output_imige.gd2 cs 1
  • pngtogd2 command loses transparency unless the original png file is properly formatted
  • pngtogd2 is distributed as part of the libgd-tools package in Debian and Ubuntu.
  • The image needs to be stored with an indexed rather than RGB color model. In GIMP, select Image -> Mode -> Indexed.
  • The color values for transparent pixels need to be retained.
Source : http://wiki.nagios.org/index.php/Status_Map_Images

Then create hostextinfo.cfg file in /usr/local/icinga/etc/objects and include the following…  (please note this is my configuration!)

define hostextinfo{
     host_name       IBM-eSERVER
#     notes_url       http://webserver/hostinfo.pl?host=you_can_edit_this
     icon_image      IBM-eSERVER_220.png
     icon_image_alt  IBM-eSERVER_220
     vrml_image      IBM-eSERVER_220.png
     statusmap_image IBM-eSERVER_220.gd2
#     2d_coords       100,250
#     3d_coords       100.0,50.0,75.0
     }

Your custom images need to be placed into ‘/usr/local/icinga/share/images/logos’ substitute the .png and .gd2 files to the names of the images that you will be using. Change the file ownership and permissions of your custom images and hostextinfo.cfg by using the following ‘chown dancer:icinga your_file_name’ also ‘chmod 664 your_file_name’ this matches the permissions and ownership of the files already in these directories. If you have multiple hosts then repeat the ‘define hostextinfo{…}’ that you wish to add custom logos to, if you wish to use the same logo for multiple hosts then they just need to be comma separated eg. ‘host_name     localhost1,localhost2,localhost3′

To enable your new hostextinfo.cfg you need to add the following to /usr/local/icinga/etc/icinga.cfg

# Definitions for custom logos
cfg_file=/usr/local/icinga/etc/objects/hostextinfo.cfg

Make sure that your configuration is good by running the following (as root) ’sudo /usr/local/icinga/bin/icinga -v /usr/local/icinga/etc/icinga.cfg’ if you have no errors, then simply restart Icinga. If you do have errors then check to make sure you have defined a valid ‘host_name’ and that you have placed your custom images into /usr/local/icinga/share/images/logos

You will be rewarded with the following…

Before…

BeforeAfter…

After

These custom logos will also show up when viewing host and service details…

Services

Note: I’m using Ubuntu some commands may vary depending on distribution
  • Share/Bookmark