Jun 152010

Hi, if you have a large number of machines to check, distant sites (or for any other reason), it may be interresting to use distributed architecture.
For that, we will use satelittes.

You could find further explanations on Centreon offitial wiki here:


The installation process is simpler (and faster) as you’ll only need the nagios part.

Here is a spreadsheet for the different login and passwords that will be used for the installation process (some of them are used in further post):

Account role Login Password
Nagios nagios nagaccess03
User account activlan remoteaccess03
Web Nagios nagiosadmin nagwebaccess03

Let’s start the installation process

Insert you CD, boot from it and proceed for a minimal install.
For the partition scheme let the system choose one for you (I recommend using LVM because in case of “out of disk space” it will be easier to extend disk).
When asked, disable the automatic update.

System update

Once it’s installed, proceed with a system update

sudo aptitude update
sudo aptitude full-upgrade -y

Switch to fixed IP address

sudo nano /etc/network/interfaces

Please verify that you are working with fixed IP address. If not, please change your settings. You should see something like this at the end of the file (the value should be different for you):

auto eth0
iface eth0 inet static


Compilation component install

sudo aptitude install build-essential -y
sudo aptitude install linux-headers-$(uname -r) -y

The headers should be already present.
If you are using a virtual machine, it’s time to install the appropriate tools (it’s up to you).


sudo aptitude install sysutils policykit ntp -y

Web and php5

sudo aptitude install apache2 apache2-mpm-prefork libapache2-mod-php5 -y
sudo aptitude install php5 php5-mysql -y
sudo aptitude install php-pear php5-ldap php5-snmp php5-gd -y


sudo aptitude install rrdtool librrds-perl -y


sudo aptitude install libconfig-inifiles-perl libcrypt-des-perl libdigest-hmac-perl libdigest-sha1-perl libgd-gd2-perl -y


sudo aptitude install snmp snmpd libnet-snmp-perl libsnmp-perl -y


sudo aptitude install libgd2-xpm libgd2-xpm-dev libpng12-dev -y

Other needed library

sudo aptitude install libldap2-dev libssl-dev libsnmp-dev -y

Now we are ready to install Nagios.

User install

PS: use “nagaccess03” as password for nagios account.

sudo useradd -m -s /bin/bash nagios
sudo passwd nagios
sudo groupadd nagcmd
sudo usermod -G nagios,nagcmd nagios
sudo usermod -a -G nagios,nagcmd www-data

Nagios Core

cd /usr/local/src
sudo wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-3.2.1.tar.gz
sudo tar xvzf nagios-3.2.1.tar.gz
cd nagios-3.2.1
sudo ./configure --prefix=/usr/local/nagios --with-nagios-user=nagios --with-nagios-group=nagios --with-command-group=nagcmd --enable-nanosleep --enable-event-broker
sudo make all
sudo make install
sudo make install-init
sudo make install-commandmode
sudo make install-config
sudo update-rc.d -f nagios defaults
cd ..

Nagios plugins 1.4.14

sudo wget http://prdownloads.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.14.tar.gz
sudo tar xvfz nagios-plugins-1.4.14.tar.gz
cd nagios-plugins-1.4.14
sudo ./configure --prefix=/usr/local/nagios --with-nagios-user=nagios --with-nagios-group=nagios
sudo make
sudo make install
cd /usr/local/src

Ndoutils 1.4b9

sudo wget http://prdownloads.sourceforge.net/sourceforge/nagios/ndoutils-1.4b9.tar.gz
sudo tar xvfz ndoutils-1.4b9.tar.gz
cd ndoutils-1.4b9
sudo ./configure --prefix=/usr/local/nagios/ --enable-mysql --disable-pgsql --with-ndo2db-user=nagios --with-ndo2db-group=nagios
sudo cp ./config/ndo2db.cfg-sample /usr/local/nagios/etc/ndo2db.cfg
sudo cp ./config/ndomod.cfg-sample /usr/local/nagios/etc/ndomod.cfg
sudo chown nagios:nagios /usr/local/nagios/etc/ndo*

It apears that with large monitoring system, ndoutils use a lot of IO and slows down drasticly the system. It’s better to installe the patched version.

cd /usr/local/src
sudo wget -r -k -np http://svn.centreon.com/trunk/Patch-NDOutils/
cd svn.centreon.com/trunk/Patch-NDOutils
sudo bash ./configure --prefix=/usr/local/nagios/ --enable-mysql --disable-pgsql --with-ndo2db-user=nagios --with-ndo2db-group=nagios
sudo make
sudo cp src/ndomod-3x.o /usr/local/nagios/bin/ndomod.o
sudo cp src/ndo2db-3x /usr/local/nagios/bin/ndo2db
sudo chmod 775 /usr/local/nagios/bin/ndo2db
sudo chmod 755 /usr/local/nagios/bin/ndomod.o
sudo chown nagios:nagios /usr/local/nagios/bin/ndo2db
sudo chown nagios:nagios /usr/local/nagios/bin/ndomod.o

Nagios web interface

I also recommend installing Nagios web interface as it could help you comparing your centreon checks and nagios exported configuration.

Use “nagwebaccess03” as password

cd /usr/local/src/nagios-3.2.1
sudo make install-webconf
sudo htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin

SNMP settings

Please edit /etc/default/snmpd

sudo nano /etc/default/snmpd

and change these sections:

#SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid'
SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid'

Replace by your IP address.


Edit snmpd configuration file:

sudo nano /etc/snmp/snmpd.conf

and change this section:

#       sec.name  source          community
#com2sec paranoid  default         public
com2sec readonly  default         public
com2sec readonly         public
com2sec readonly         public
#com2sec readwrite default         private

Edit ndomod configuration file:

sudo nano /usr/local/nagios/etc/ndomod.cfg

find and replace these sections:


Edit sudoers grant file:

sudo nano /etc/sudoers

and add nagios user account after root account:

nagios ALL=(ALL) ALL

Create missing folder:

sudo mkdir -p /var/lib/centreon/centplugins/
sudo chown nagios:nagios /var/lib/centreon/centplugins/

The following steps have to be done on CENTRAL CENTREON SERVER

If you didn’t generate ssh key yet, proceed as follow.
Log you on Centreon Central server and switch to nagios account.

su nagios
cd ~

Here is an example of produced output (just press ENTER to all questions):

Generating public/private rsa key pair.
Enter file in which to save the key (/home/nagios/.ssh/id_rsa): 
Created directory '/home/nagios/.ssh'.                                                                                     
Enter passphrase (empty for no passphrase):                                                                                
Enter same passphrase again:                                                                                               
Your identification has been saved in /home/nagios/.ssh/id_rsa.
Your public key has been saved in /home/nagios/.ssh/id_rsa.pub.
The key fingerprint is:
17:f1:f4:f3:2a:de:94:eb:36:8a:82:84:d3:cb:cf:ee nagios@act-centreon-test
The key's randomart image is:
+--[ RSA 2048]----+
|          . .    |
|           + .   |
|          . . o  |
|           .   o |
|     o  S .     .|
|    o o  .     o |
|     + o    . +  |
|      +..  o +o. |
|       +E.. o++. |

After that, copy your public key to the satellite:

ssh-copy-id -i ~/.ssh/id_rsa.pub nagios@{SATELITTE_IP_ADDRESS}

Use nagaccess03 for accessing your satellite (or use your own password).
Verify that you could access to the satellite without password prompt:


Exit to came back to your central centreon server.
Synchronize commands with the satellite:

scp /usr/local/nagios/libexec/* nagios@{SATELITTE_IP_ADDRESS}:/usr/local/nagios/libexec
scp /usr/local/nagios/bin/ndomod.o nagios@{SATELITTE_IP_ADDRESS}:/usr/local/nagios/bin

if you encounter access denied errors like:

scp: /usr/local/nagios/libexec/check_dhcp: Permission denied

Delete files from satellite and resync again with scp.

Optionnaly, if you use rsyslog module in Centreon, redirect your logs:
Edit rsyslog configuration file

sudo nano /etc/rsyslog.conf

Add at the end of the file log events redirection inside your database:

       *.=warning @{CENTREON_CENTRAL_IP_ADDRESS}

Replace {CENTREON_CENTRAL_IP_ADDRESS} by the real IP address.

Edit 50-default.conf to correct the path

sudo nano /etc/rsyslog.d/50-default.conf

At the end of the file, comment the xconsole section:

#       news.err;\
#       *.=debug;*.=info;\
#       *.=notice;*.=warn       |/dev/xconsole

Optionnaly intall NRPE module:

cd /usr/local/src
sudo wget http://downloads.sourceforge.net/project/nagios/nrpe-2.x/nrpe-2.12/nrpe-2.12.tar.gz?use_mirror=kent
sudo tar xzfv nrpe-2.12.tar.gz
cd nrpe-2.12/
sudo ./configure
sudo make all
sudo make install-plugin

Reboot your satellite.

Connect to the web interface and proceed as follow:

Add a new pooler:

Your IP address may be different.

Add new satelittes ndomod configuration:

Output is your Centreon IP address.

Addin new nagios satelittes configuration file:

Duplicate the existing one then edit it:

Add a new host (your satelitte):

PS: Your IP address may be different.

Maybe you have noticed that I monitor my satellite from the central server. You should monitor your central server by your satelitte (it’s not advised to do a self monitoring)
Change the Centreon host. It has to be monitored by the satelitte:

Export once with debug:

You should see two tabs:

Check on both servers the result (you should not have errors):

If it’s ok, export your configurations:


  2 Responses to “Adding satelitte to centreon with Ubuntu 10.04 LTS”

  1. Thanks so much for this document, it helped me a lot.


  2. Hi,

    I’m glad it helped you.