Monthly Snap February: Icinga Camp Berlin & New York, Howtos & #icingalove

Icinga is coming to Berlin for the 3rd time next week, and we are super excited to share the latest developments with you. And of course to meet again with our awesome community and have a couple of G&Ts 🙂 If you can’t make it, our first Icinga Camp New York happens on March 16th the week after!
Under the hood, many things are going on – bugfix sprints, module development, and much more. Eric will tell you about the current development status and our future roadmap in his talk at Icinga Camp Berlin. Still not convinced? You can ask him anything in person too 🙂
(more…)

Upgrade your monitoring from Nagios to Icinga

We try to be compatible with the configuration files of the current Nagios 3.x versions so there should be very little you have to do to upgrade from Nagios 3.x to Icinga 1.2. Assuming you’ve already installed Nagios from source code as described in the Nagios quickstart guide, you can install Icinga quite easily.
Please visit the docs section for the complete migration guide:

Upgrading from Nagios 3.x releases

Upgrading from Nagios 2.x releases

Icinga is used by more and more people and organisations around the world. If you using Icinga already and you want to share this with others please drop us a note and become part of a vivid community!

Icinga IDOUtils – More Improvements Part III

One last shot this time for upcoming Icinga 1.0.1 and IDOUtils:
After getting several core patches into the master and also fixing duplicated service/hoststatus updates being sent to the neb module (thanks to Matthieu Kermagoret) there will be more improvements for IDOUtils.
Since the threaded housekeeper is doing fine, it is possible to periodically clean more tables. By popular demand, the following options have been added to ido2db.cfg

They can be used for your likings, by default they are not set.
If you want to help us test for the upcoming release, you are very welcome to do so!
To help you with GIT, we now have a quite detailed tutorial how to use GIT based on Icinga in our Developer Wiki =)

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

How I have Icinga on my home server

I’ve been using Icinga since the first release was made public back in May this year.  I first heard of the project via Twitter, and as the tweet had a URL posted I simply clicked on it and read all about what Icinga was to be about and the new direction the development team were going to take on the project as it matures. So I was keen to get my hand on the code and install it.
So after simply building and installing version 0.8.0 I had a very basic level of reporting. My home server is a work in progress, in that its really my platform for teaching myself how to both use and configure the services I have implemented. I run Postfix, Dovecot, Apache2, PHP5, MySQL (LAMP) along with SSH and vsftp. Now the default configuration provides monitoring for SSH but I was wanting to expand this to cover the FTP, SMTP & IMAP servers. So my first call for help I posted a request on the icinga-users mailing list, I received an overwhelming response to my call! (this is the icinga community at work!) Now as I have Icinga installed on that server I have only modified the localhost.cfg and appended to the end of this file the following…

# postfix vk7hse.hobby-site.org
define service{
use 			local-service
host_name 		IBM-eSERVER
service_description 	SMTP
check_command 		check_smtp
}
# vsftp vk7hse.hobby-site.org
define service{
use 			local-service
host_name 		IBM-eSERVER
service_description 	FTP
check_command 		check_ftp
}
# imap vk7hse.hobby-site.org
define service{
use 			local-service
host_name 		IBM-eSERVER
service_description 	IMAP
check_command 		check_imap

Then I added the configuration for those services… (files postfix.cfg, ftp.cfg & imap.cfg in /usr/local/icinga/etc/objects)

define host{
use 				generic-postfix
host_name 			localhost
alias 				postfix
address 			192.168.0.1
check_command 			check_smtp
max_check_attempts 		10
notification_interval 		120
notification_period 		24×7
notification_options 		d,u,r
contact_groups 			admins
}
define host{
use 				generic-ftp
host_name 			localhost
alias 				vsftp
address 			192.168.0.1
check_command 			check_ftp
max_check_attempts 		10
notification_interval 		120
notification_period 		24×7
notification_options 		d,u,r
contact_groups 			admins
}
define host{
use 				generic-imap
host_name 			localhost
alias 				imap
address 			192.168.0.1
check_command 			check_imap
max_check_attempts 		10
notification_interval 		120
notification_period 		24×7
notification_options 		d,u,r
contact_groups 			admins
}

So as you can see the formula is the same for the three services, this then results in…

services on http://www.vk7hse.hobby-site.org

So that’s how I have Icinga running here, this may not be the optimum but its working for what I need.