Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How to install latest icinga & icinga-web on Ubuntu Server 12.04 & How to monitor remote hosts ?

share|improve this question
up vote 14 down vote accepted

                         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

apt-get install dbconfig-common

Now install the Icinga and Iciga-Idoutils packages, this should install a whole lot of dependencies as well

apt-get install python-software-properties 
add-apt-repository ppa:formorer/icinga
apt-get update

Installing icinga

apt-get install icinga icinga-idoutils mysql-server libdbd-mysql mysql-client

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 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

    cd /etc/icinga/modules
    nano idoutils.cfg

Now paste the following lines .

define module{
        module_name     idomod
        module_type     neb
        path            /usr/lib/icinga/
        args            config_file=/etc/icinga/idomod.cfg

For Safe Side also do

ln -s /usr/lib/icinga/ /usr/sbin/


nano /etc/default/icinga

Edit IDO2DB=no to yes


And Run

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

look in /var/log/syslog

                                                 Configuring Icinga to send email


nano /etc/icinga/objects/contacts_icinga.cfg


root@localhost to your-email-address


add-apt-repository ppa:formorer/icinga-web
apt-get update
apt-get install icinga-web


                      Monitoring Remote Host From Your Server

The only think you need to install on remote server is nrpe & nagios-plugins

In this example my remote host is a freeBSD server which i want to monitor remotely

pkg_add -r nagios-plugins nrpe

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= line. points to the address of your Nagios server.


Start the NRPE daemon.

/usr/local/etc/rc.d/nrpe2 start

                                  Now back to Icinga Server

cd /etc/icinga/objects


nano localhost_icinga.cfg

define host{
        use                     generic-host            ; Name of host template to use
        host_name               localhost
        alias                   localhost

Add another host under it. FreeBSD Server

define host{
        use                     generic-host            ; Name of host template to use
        host_name               FreeBSD
        alias                   FreeBSD
        address                 ip-address-of-FreeBSD-server

Now at every service define your host seperated by " , " localhost,FreeBSD

host_name localhost,FreeBSD ; 2 hostname may be more depend of host you define

Example For One Service

define service{
        use                             generic-service         ; Name of service template to use
        host_name                       localhost,FreeBSD
        service_description             Disk Space
        check_command                   check_all_disks!20%!10%

Now Edit hostgroups_icinga.cfg for monitoring HTTP & SSH

nano hostgroups_icinga.cfg

define hostgroup {
        hostgroup_name  http-servers
                alias           HTTP servers
                members         localhost,FreeBSD 

# A list of your ssh-accessible servers
define hostgroup {
        hostgroup_name  ssh-servers
                alias           SSH servers
                members         localhost,FreeBSD

Now restart icinga

/etc/init.d/icinga restart

Now go to OR monitor your remote host from Ubuntu

Help Page not found | Homepage von Michael Meier. Way Back Machine

Installing NRPE on FreeBSD 9.0

Setting up Icinga with IDOUtils on Ubuntu - HowTos - Icinga Wiki


BUG icinga is not sending emails .

Edit your /ets/hosts file & if should look like this  localhost xxxx-host-xxx 
xxx.xx.xx  localhost xxxx-host-xxx FreeBSD
share|improve this answer
Helped me a lot, thanks! Especially the bug part about idoutils.cfg. Still present and not mentioned in any getting started guide. Sigh. – gertvdijk Sep 20 '12 at 18:08
I don't think your check_all_disks command will work remotely as you don't use check_nrpe anywhere I don't see how it can gather the data from remote. It will use the data of localhost and publish it for the remote - not good. See also this page. – gertvdijk Sep 20 '12 at 22:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.