We have Icinga1 and Icinga2 as our monitoring system.
Icinga1: It is a fork of Nagios
Icinga2: In this nagios is re-written from scratch
For Installation of Icinga1 on Ubuntu 14.04, refer to this link, it is explained over here.
Here Is the step by step procedure for installing Icinga2
**Step 1: **Add repository and install icinga2 on both host and monitoring server
#add-apt-repository ppa:formorer/icinga
#apt-get update
#apt-get install icinga2
**Step 2: **Install MySQL database on Monitoring Server
#apt-get install mysql-server mysql-client
**Step 3: **Install Icinga2 Database
#apt-get install icinga2-ido-mysql
**Step 4: ** Login to Mysql Database
#mysql -u root -p
**Step 5: **Now create a database named 'icinga' and assign privileges to it. For that run following in mysql shell
CREATE DATABASE icinga;
GRANT SELECT, INSERT, UPDATE, DELETE, DROP, CREATE VIEW, INDEX, EXECUTE ON icinga.* TO 'icinga'@'localhost' IDENTIFIED BY 'icinga';
quit
**Step 6: **Enable livestatus feature
#icinga2 feature enable livestatus
**Step 7: **Restart Icinga
# service icinga2 restart
**Step 8: **Assign User mode
usermod -a -G nagios www-data
**Step 9: **Enable some features
#icinga2 feature enable compatlog
#icinga2 feature enable ido-mysql
#icinga2 feature enable command
#service icinga2 restart
For installing Web View, go through this process
**Step 1: ** Install Git
#apt-get install git
**Step 2: ** Clone web view repository
#git clone git://git.icinga.org/icingaweb2.git
**Step 3: **Move cloned directory to /usr/share/icingaweb
#mv ../icingaweb2 /usr/share/icingaweb
**Step 4: **Navigate to /usr/share/icingaweb
#cd /usr/share/icingaweb
**Step 5: **Install Lamp Server
#apt-get install tasksel
#apt-get install lamp-server
**Step 6: **Configure apache with icinga
./bin/icingacli setup config webserver apache --document-root /usr/share/icingaweb/public
**Step 8: **Above command will generate a apache configuration code, copy the code generated code and add this directory to be listen at port 80 in configuration file. You can make a new configuration file and activate that file using a2ensites
command or add the code to 000-default.conf file
**Step 9: **restart apache
#a2enmod rewrite
#service apache2 restart
**Step 10: **Create a directory in which icinga web will keep all of its authentication files
#mkdir /etc/icingaweb2
**Step 11: **Shange its permission to 777
#chmod 777 -R /etc/icingaweb
**Step 12: **Now open your favorite Browser and navigate to localhost/icingaweb2/setup
its asking for setup token, generate it by follwing command.
#su www-data --shell=/bin/bash -c "mkdir -m 2770 /etc/icingaweb2; head -c 12 /dev/urandom | base64 | tee /etc/icingaweb2/setup.token; chmod 0660 /etc/icingaweb2/setup.token;";
You are done, you are ready for monitoring. Just resolve some packages dependencies of php5 and setup your monitoring server
For further reference go through Official Documentation