Icinga - Open Source Monitoring - Installing on Debian 5 (Lenny) with IDOUtils and MySQL database

icon_icinga_bigger As reported last year, was the well-known open-source Nagios monitoring service forked and released under the project ICINGA in new splendor. I will describe here in the next few weeks, my experiences and publish some HowTo's it. The start is with the installation of 1.0.2 + ICINGA IDOUtils under Debian Lenny.

last update: 01.07.2010 Icinga version 1.0.2

Dependencies and install the required programs

The following requirements must be installed for the operation of ICINGA:

*) Apache Web Server
*) MySQL database + libdbi driver
*) GCC compiler, C / C + + dev libraries
*) GD Library

Installing the Apache Web server + Mysql Database

The required libdbi drivers are installed via the following command:

apt-get install -y libdbi0-dev libdbd-mysql

The GCC compiler and the required C / C + + development libraries are installed together as a build-essential:

apt-get install -y build-essential

Installing the GD libraries:

apt-get install -y libgd2-xpm-dev libjpeg62-dev libpng12-dev

Creating user and group for ICINGA

This ICINGA works, it requires its own user named icinga. This place we like to follow and assign a password:

useradd -m icinga
passwd icinga

To use the web interface with full functionality (can send commands) will still require a special group in which the two icinga and user www-data to be added:

groupadd icinga-cmd
usermod -a -G icinga-cmd icinga
usermod -a -G icinga-cmd www-data

Download and unzip ICINGA

the preparations made so far are the To, can ICINGA from SourceForge downloaded and extracted it to be validated. I always use this directory to / usr / src. Please ensure that you download the current stable version to install any older version. In my case, the version 1.0.2, the current stable version.

cd /usr/src
wget http://sourceforge.net/projects/icinga/files/icinga/1.0.2/icinga-1.0.2.tar.gz/download
wget http://sourceforge.net/projects/icinga/files/icinga/1.0.2/icinga-1.0.2.tar.gz.md5/download
md5sum -c icinga-1.0.2.tar.gz.md5

The following result has the MD5 Check out:

icinga-1.0.2.tar.gz: OK

The package is then extracted with the following command in the / usr / src directory:

tar xvzf icinga-1.0.2.tar.gz

Installing ICINGA

We now start the actual installation of ICINGA with the appropriate options for IDOUtils

cd /usr/src/icinga-1.0.2
./configure --with-command-group=icinga-cmd --enable-idoutils
make all
make fullinstall

The specific steps may vary depending on the system some time to complete. The default installation of ICINGA is complete, are designed to operate but some additional configuration steps. An examples configuration was already created in the path / usr / local / icinga / etc.

Download and install the Nagios Plugins

ICINGA uses the Nagios plugins to perform the actual checks. The plugins are small independent programs that can be used independently of ICINGA or Nagios. The download is also at SourceForge available and I recommend again to use the latest stable version. In my case the version 1.4.14.

cd /usr/src
wget http://sourceforge.net/projects/nagiosplug/files/nagiosplug/1.4.14/nagios-plugins-1.4.14.tar.gz/download
tar xzvf nagios-plugins-1.4.14.tar.gz

After extracting the plug-ins can be installed:

cd /usr/src/nagios-plugins-1.4.14
./configure --prefix=/usr/local/icinga --with-nagios-user=icinga
make
make install

User for the Web interface to create ICINGA

Now we define the user and a corresponding password, which we can apply our future on the Web Interface icingaadmin (to be replaced by any user names):

htpasswd -c /usr/local/icinga/etc/htpasswd.users icingaadmin

are Note: To add additional users later, the option "-c" have been omitted because the file is otherwise always regenerate and overwritten. Following the restart Apache:

/etc/init.d/apache2 restart

Configuration of the MySQL database and IDOUtils

This IDOUtils writes in our MySQL database, we must create an appropriate database and configure IDOUtils. With this command, connect to the MySQL server console:

mysql -u root -p

You will be asked for your password, which you have specified during installation. Lay out the database and the user is at icinga. Please password with a password accordance to replace.

create database icinga;
GRANT USAGE ON *.* TO 'icinga'@'localhost' IDENTIFIED BY ' password ' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0;
GRANT SELECT , INSERT , UPDATE , DELETE ON icinga.* TO 'icinga'@'localhost';
flush privileges;
quit

After the database and the user is created, we play the included in the source database structure in the database icinga:

cd /usr/src/icinga-1.0.2/module/idoutils/db/mysql
mysql -u root -p icinga < mysql.sql

Now IDOUtils must still be communicated to the database connection. This we call the sample configurations to ...

mv /usr/local/icinga/etc/ido2db.cfg-sample /usr/local/icinga/etc/ido2db.cfg
mv /usr/local/icinga/etc/idomod.cfg-sample /usr/local/icinga/etc/idomod.cfg

... And adjust the entries corresponding to (again by replacing the password entered password):

vi /usr/local/icinga/etc/ido2db.cfg

db_servertype=mysql
db_host=localhost
db_port=3306
db_name=icinga
db_user=icinga
db_pass= password

Now you have the idomod event broker module to be activated. For this we edit the file and remove insert the appropriate row or the comment character if the line already exists.

vi /usr/local/icinga/etc/icinga.cfg

broker_module=/usr/local/icinga/bin/idomod.o config_file=/usr/local/icinga/etc/idomod.cfg

Start services and startup configuration

The relevant services and / or init scripts should be started in this order:

/etc/init.d/ido2db start
/etc/init.d/icinga start

This startup IDOUtils and ICINGA be run automatically in the correct order, we need these two commands

update-rc.d ido2db defaults 50
update-rc.d icinga defaults 51

The Web Interface

Congratulations, your ICINGA is now fully operational and monitored the local server.

The first stone should be laid. Now it's up to you to fill your ICINGA and monitor your server farms. If you should already have had a Nagios in use, then it is easily possible to apply the configuration files. So in a few steps to the existing Nagios by Icinga be replaced. Other updates, such as installation of NagVis , NConf and NETWAYS Grapher come in the next days and weeks. To subscribe to any update to miss her best to my RSS feed or follow me on Twitter and Facebook .

Access to the web interface is easy via the browser using the following URL:

http://serverip/icinga

And so does the monitoring at ICINGA Server:

Similar items:

  1. ICINGA - Nagios is geforked
  2. Web server (LAMP) installation in Debian 5 (Lenny) and Ubuntu
  3. VMware Server 2 installation on Debian 5 (Lenny)
  4. MySQL - ERROR 1045: Access denied for user 'debian-sys-maint' @ 'localhost'
  5. Icinga (Nagios Fork) 0.8.0 beta released + Demo System Online

Tags: , , , , , ,

Friday, January 15th, 2010 Linux

6 Comments on Icinga - Open Source Monitoring - Installing on Debian 5 (Lenny) with IDOUtils and MySQL database

  • Thanks for the great tutorial!

    If there are mistakes or feature requests arise, we are on an entry to the issues at https: / / dev.icinga.org / very grateful! :)

    Regards

    Christian

  • Reiner says:

    A super guide.
    Two small errors I would like to call:

    fasch: / etc / init.d / apache restart
    restart correctly: / etc/init.d/apache2
    fasch: flush privileges
    right: flush privileges;

    If someone with the vi is not as fit.
    Kurzref here: http://www.fehcom.de/pub/viref.pdf

    • Patrick says:

      Hi Reiner,

      Thank you for your advice. As is always creep in this Schlampigkeitsfehler ;)
      habs definitely corrected immediately.

      lg
      Patrick

  • Klaus Wenzel says:

    Hi,

    super instructions. Did you get the start. I NEN times ne super Sache. Thank you

    Even small ne NOTES:
    mv / usr/local/icinga/etc/ido2db.cfg-sample
    / Usr/local/icinga/etc/ido2db.cfg
    will / should be on one line, then 110%

    Greeting
    KLaus

    • Patrick says:

      Hi Klaus,

      Thanks for the praise!

      Said command is actually written in a row, just not enough space in order to represent as a line ;)

      Greeting
      Patrick

  • Leave a Reply

    rssfeed xing delicious
    Sysadmin's Life on Facebook
    steve jobs steve jobs
      Bloggeramt.de Blog directory - blog directory bloggerei.de blogoscoop blogtotal www.beliebtestewebseite.de technorati_fav Creative Commons License Internet & Communications