Icinga (Monitoring Solution) Installation And Configuration On CentOS

Icinga is an enterprise grade open source monitoring system which keeps watch over networks and any conceivable network resource, notifies the user of errors and recoveries and generates performance data for reporting. Scalable and extensible, Icinga can monitor complex, large environments across dispersed locations.

I am going with the Icinga basic installation and this is similar to Nagios and this document can also be referred for Nagios installation, too. Lots of documents are available on the Internet and they will be installing with nagios user but for my setup I made use of the default user which is already present in the system (daemon) and also I will not be installing it on the default path instead I will be referring to /opt since I find it very convenient. The UI of Icinga is much better than Nagios.

In this tutorial I will using three servers:

192.168.1.20 – Icinga monitoring server (centos5)
192.168.1.30 – win 2008 to be monitored
192.168.1.40 – Ubuntu 10.10 server to be monitored

 

Requirements

Note: Make sure development tools and development libraries have been installed during installation:

  • GCC compiler
  • C/C++ development libraries
  • GD development libraries

 

Packages Needed

1. Xampp for Linux:

[[email protected]~]# mkdir /software
[[email protected]~]# cd /software
[[email protected] software]# wget http://sourceforge.net/projects/xampp/files/XAMPP%20Linux/1.7.3/xampp-linux-1.7.3.tar.gz/download

2. Icinga core:

  [[email protected] software]# wget http://sourceforge.net/projects/icinga/files/icinga/1.2.1/icinga-1.2.1.tar.gz/download

 

Installation of Icinga

1. Untar the xampp package:

[[email protected] software]# tar -zxvf xampp-linux-1.7.3.tar.gz
[[email protected] software]# mv lampp/ /opt/

Xampp package is very neatly compilied package and extracting the same is more than enough for more details can refer to xampp page:

http://www.apachefriends.org/en/xampp.html

2. Untar the Icinga package:

[[email protected] software]# tar -zxvf icinga-1.2.1.tar.gz
[[email protected] software]# cd icinga-1.2.1
[[email protected] icinga-1.2.1]# ./configure --prefix=/opt/icinga --with-icinga-user=daemon --with-icinga-group=daemon --with-httpd-conf=/opt/lampp/etc

Note: please make sure you do not get any error while compiling. If you are getting errors make sure the required packages are installed.

[[email protected] icinga-1.2.1]# make all
[[email protected] icinga-1.2.1]# make install
[[email protected] icinga-1.2.1]# make install-config
[[email protected] icinga-1.2.1]# make install-commandmode
[[email protected] icinga-1.2.1]# make install-webconf

3. Now need to configure Apache with Icinga:

[[email protected] icinga-1.2.1]# cd /opt/lampp/etc/
[[email protected]]# vim httpd.conf

4. Add the following line:

Include etc/icinga.conf

5. Set password for login:

[[email protected] /]# cd /opt/lampp/bin/
[[email protected] bin]# ./htpasswd –c /opt/icinga/etc/htpasswd.users icingaadmin

New password:
Re-type new password:
Adding password for user icingaadmin

6. Start Apache:

[[email protected]]# cd /opt/lampp/
[[email protected]]# ./lamp startapache

XAMPP: Starting Apache with SSL (and PHP5)...
XAMPP: Error 1! Couldn't start Apache!
XAMPP: Starting diagnose...
XAMPP: Make the httpd.conf fit your system.
XAMPP: Next try...
XAMPP: Starting Apache with SSL (and PHP5)...

7. Check whether Apache is working:

  http://192.168.1.20

8. Now we need to start Icinga but before that we need to check whether Icinga has been compiled properly and all the configuration are set:

  [[email protected]]# cd /opt/icinga/

9. Before configuring Icinga we will start and see whether we get the page:

  [[email protected]]# /opt/icinga/bin/icinga –v /opt/icinga/etc/icinga.cfg

Total Warnings: 0
Total Errors: 0

Things look okay - No serious problems were detected during the pre-flight check.

10. Now start Icinga since we do not get any errors:

[[email protected]]# /opt/icinga/bin/icinga -d /opt/icinga/etc/icinga.cfg
[[email protected]]# ps -ef|grep icinga

daemon 6961 1 0 19:03 ? 00:00:00 /opt/icinga/bin/icinga -d /opt/icinga/etc/icinga.cfg
root 6998 2929 0 19:05 pts/1 00:00:00 grep icinga

[[email protected]]# chmod 777 /opt/
[[email protected]]# chmod 777 /opt/icinga/
[[email protected]]# chmod 777 /opt/icinga/var/
[[email protected]]# chmod 777 /opt/icinga/var/rw/
[[email protected]]# chmod 777 /opt/icinga/var/rw/icinga.cmd

11. Login to check whether Icinga website opens:

Share this page:

Suggested articles

7 Comment(s)

Add comment

Comments

By: Berry Sizemore

I successfully got Icinga up and running, and I am very pleased to say that this tutorial is pretty much how I did it.   When it came to nrpe, it required a slightly different configure command formation.  I also skipped the sendmail section in favor of Postfix, because it was already configured.  I also used more recent versions of the software used without penalty.  Sometimes things can get crazy if you stray to newer versions, but not in this case at this time.

Thanks for the great work!

By: konsultor

...but the image of the browser is too small to make out the URL that is supposed to reach icinga. A line of text would be enlightening and helpful.

By: Anonymous

Hi, I got stuck at step 5. I guess it is because I am using the latest packages. Xampp 1.8.1 & Icinga 1.8.3. There muct be something I am missing that I can perform anything beyond step 5. Please help.

By: David Downing

Try this article: https://www.rosehosting.com/blog/how-to-install-icinga-network-monitoring-system-on-a-centos-7-vps/, i followed it and installed Icinga successfully.

By: Terver

Hello, Nice and detailed piece of note. I need help ASAP.

 I successfully installed and configured icinga to "step11. Login to check whether Icinga website opens:" and i was unable to open ther website, it gives me the error below. Kindly assist as all other procedures i followed worked fine. Thank you 

 

Server error!

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.

If you think this is a server error, please contact the webmaster.

Error 500

172.17.15.30
Thu 13 Jun 2013 03:01:58 PM WAT
Apache/2.2.14 (Unix) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l PHP/5.3.1 mod_apreq2-20090110/2.7.1 mod_perl/2.0.4 Perl/v5.10.1

 

By: raghupathy

Hi Team,

Requesting to please help, as i have followed the steps, When i am trying to launch the portal url.

http://192.168.131.192/icinga

Server error!

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.

If you think this is a server error, please contact the webmaster.

Error 500 192.168.131.192Fri 13 Nov 2015 06:43:31 PM ISTApache/2.2.14 (Unix) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l PHP/5.3.1 mod_apreq2-20090110/2.7.1 mod_perl/2.0.4 Perl/v5.10.1 please provide the solution for this error. Thanks in advances. regards,raghu.

By: rajan

How to add multiple windows host with check mk agent.