How to install latest icinga & icinga-web on Ubuntu Server 12.04 & How to monitor remote hosts ?
Installing the neccessary software
Lets start with installing dbconfig-common. This package is used during the installation of the remaining software to ask the user questions about database access
Now install the Icinga and Iciga-Idoutils packages, this should install a whole lot of dependencies as well
During the installation you’ll need to provide parameters for Postfix choose the default internet site and the password of your MySQL root user. Be sure to provide valid answers because the information will be written to several files and changing them afterwards is annoying.
Now the first part is done and you should already be able to access your Icinga installation at http://yourhostname.com/icinga with the username ‘icingaadmin’ and the password you entered during installation.
Configuring idoutils and ido2db
To enable ido2db, edit /etc/default/icinga and set IDO2DB to ‘yes’ .
**BUG if you are installing icinga 1.7.1 ++ you need to create a file manually
Now paste the following lines .
For Safe Side also do
Edit IDO2DB=no to yes
look in /var/log/syslog
Monitoring Remote Host From Your Server
In this example my remote host is a freeBSD server which i want to monitor remotely
In the "/etc/rc.conf" file, add a line to enable the nrpe2 daemon.
In the "/usr/local/etc" directory, copy the "nrpe.cfg-sample" file to a file named "nrpe.cfg". Use the "chmod u+x nrpe.cfg" command to add write permissions for the root user.
Open the file in a text editor, and look for the "allowed_hosts=127.0.0.1" line. points to the address of your Nagios server.
Start the NRPE daemon.
Now back to Icinga Server
Add another host under it . FreeBSD Server
host_name localhost,FreeBSD ; 2 hostname may be more depend of host you define
Example For One Service
Now Edit hostgroups_icinga.cfg for monitoring HTTP & SSH
Now restart icinga