HOWTO install icinga 1.5.1 on CentOS 6.0

Icinga 1.5.1 installation on CentOS 6.0 – using the RPM files

//UPDATE 14/11/2011 – 10:22 PST: You will find the RPM packages in the RPMforge repository: Repoforge RPMforge // Use it at your own risk, for more information about the repositories read: CentOS Wiki)

yum install icinga icinga-idoutils icinga-gui libdbi-dbd-mysql

It’s automatically added to the default runlevels.

create MySQL user and database:

#> mysql -u root -p
 mysql> CREATE DATABASE icinga;
 GRANT USAGE ON *.* TO 'icinga'@'localhost'
   IDENTIFIED BY 'icinga'
   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

Please change the mysql data to your own!

Import database scheme for MySQL:

#> cd /etc/icinga/idoutils/mysql
#> mysql -u root -p icinga < mysql.sql

Change the mentioned database options in this file.

vim /etc/icinga/ido2db.cfg
db_servertype=mysql
db_port=3306
db_user=icinga
db_pass=icinga

Install basic modules.

UPDATE 18/11/2011 – 12:38 PST: added RPM Package install

From RPM Package

yum install nagios-plugins

change path in

/etc/icinga/resource.cfg
to
/usr/lib/nagios/plugins/

From Sources

http://sourceforge.net/projects/nagiosplug/files/nagiosplug/1.4.15/

wget http://sourceforge.net/projects/nagiosplug/files/nagiosplug/1.4.15/nagios-plugins-1.4.15.tar.gz/download
tar -zxf nagios-plugins-1.4.15.tar.gz
cd nagios-plugins-1.4.15
./configure --prefix=/usr/share/icinga \
--with-cgiurl=/icinga/cgi-bin --with-htmurl=/icinga \
--with-nagios-user=icinga --with-nagios-group=icinga

If the configure command is not working, see my other post: CentOS “build-essentials” – http://epis.ch/dd

make
make install
vim /etc/icinga/resource.cfg

change the line, because this is the path where the plugins are!

$USER1$=/usr/share/icinga/libexec

Next steps

The webinterface has a .htaccess protection enabled, but without any user! So you have to create one.

vim /etc/icinga/htpasswd.users

Use this following line to have username = “icingaadmin” and password set to “icinga”

icingaadmin:{SHA}8XLF6eTYQKVTVogqK2RIRrMCshY=

disable SELinux, otherwise the Classic UI doesn’t work!

vim /etc/sysconfig/selinux

change line to

SELINUX=disabled

Now reboot the machine!

After that you can login to the Classic UI on http://localhost/icinga with username=icingaadmin/passwort=icinga

Source: icinga Documentation – http://docs.icinga.org/

2 Comments for “HOWTO install icinga 1.5.1 on CentOS 6.0”

Jan R.

says:

Hallo,
welche repositories verwendest du?

In Base, Extras und Updates findet er nichts…

Danke!

Leave a Reply

Your email address will not be published. Required fields are marked *