May 082010
 

Hi, you have probably noticed that the new LTS release is out 🙂
So I decided to update the intallation process. You’ll probably notice that it didn’t change so much regarding to the 8.04 (in fact a few packages have their name changed, rsyslog natively integrated into the system, and so on)

Before starting the installation process, let define some rules we will follow: I recommend that before you start any installation you define a template for the naming scheme of your monitored machines. I decided to uses this one (but it’s up to you to create your own): 3 first letters for customer-name of the machine-environment. In my case it’s ACT-CENTREON-TEST (ACT for ACTIVLAN, Centreon for my computer and test for the target environment) for the central monitoring machine.

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
MySQL root access root mysqlcentaccess03
Nagios nagios nagaccess03
User account activlan remoteaccess03
Mysql account centreon mysqlcentreon03
Web Nagios nagiosadmin nagwebaccess03
Web Centreon admin actwebaccess03

Let 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.
DO NOT INSTALL ANY ROLE EXCEPT SSH AND MAIL.
For the mail configuration, choose local mail.

System update

Once it’s installed, proceed to 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
address 192.168.1.100
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1

REBOOT

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

MySQL

sudo aptitude install mysql-server libmysqlclient-dev -y

Use mysqlcentaccess03 for root MySQL password

System

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

RRDTool

sudo aptitude install rrdtool librrds-perl -y

Perl

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

SNMP

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

GD-Libraries

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 and Centreon.

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 make
sudo cp ./config/ndo2db.cfg-sample /usr/local/nagios/etc/ndo2db.cfg
sudo cp ./config/ndomod.cfg-sample /usr/local/nagios/etc/ndomod.cfg

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 127.0.0.1'
SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid 127.0.0.1 192.168.0.148'

Replace 192.168.0.148 by your IP address.

#TRAPDRUN=no
TRAPDRUN=yes

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  127.0.0.1         public
com2sec readonly  192.168.0.0/24         public
#com2sec readwrite default         private

NDO database configuration

Create your database

mysqladmin -u root --password=mysqlcentaccess03 create ndo
mysql -u root --password=mysqlcentaccess
mysql> GRANT ALL ON ndo.* TO ndouser@localhost IDENTIFIED BY "ndopassword"; FLUSH PRIVILEGES;
mysql> exit;
cd /usr/local/src/ndoutils-1.4b9/db
./installdb -u ndouser -p ndopassword -h localhost -d ndo

ignore the error message

Edit ndomod configuration file:

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

find and replace these sections:

#instance_name=default
instance_name=Central
output_type=tcpsocket
#output_type=unixsocket
output=127.0.0.1
#output=/usr/local/nagios/var/ndo.sock
#reconnect_warning_interval=15
reconnect_warning_interval=900
#config_output_options=2
config_output_options=3

Edit ndo2db configuration file:

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

find and replace these sections:

#socket_type=unix
socket_type=tcp
db_name=ndo
# Keep timed events for 24 hours
max_timedevents_age=1440
# Keep system commands for 1 week
max_systemcommands_age=1440
# Keep service checks for 1 week
max_servicechecks_age=1440
# Keep host checks for 1 week
max_hostchecks_age=1440
# Keep event handlers for 31 days
max_eventhandlers_age=1440

Edit nagios configuration file:

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

find “broker” section and add this entry:

broker_module=/usr/local/nagios/bin/ndomod.o config_file=/usr/local/nagios/etc/ndomod.cfg

Edit sudoers grant file:

sudo nano /etc/sudoers

and add nagios user account after root account:

nagios ALL=(ALL) ALL

Create ndo2db file:

sudo nano /etc/init.d/ndo2db

Paste the following script (be carefull if you choose to use diferent credentials than nagios:nagios, you’ll have to modifiy the corresponding lines below(find NdoUser and NdoGroup)):

#!/bin/sh
#
#
# chkconfig: 345 99 01
# description: Nagios to mysql
#
# Author : Gaëtan Lucas
# Realase : 07/02/08
# Version : 0.1 b
# File : ndo2db
# Description: Starts and stops the Ndo2db daemon
#              used to provide network services status in a database.
#

status_ndo ()
{
        if ps -p $NdoPID > /dev/null 2>&1; then
                return 0
        else
                return 1
        fi

        return 1
}

printstatus_ndo()
{
        if status_ndo $1 $2; then
                echo "ndo (pid $NdoPID) is running..."
        else
                echo "ndo is not running"
        fi
}

killproc_ndo ()
{
        echo "kill $2 $NdoPID"
        kill $2 $NdoPID
}

pid_ndo ()
{
        if test ! -f $NdoRunFile; then
                echo "No lock file found in $NdoRunFile"
                echo -n "         checking runing process..."
                NdoPID=`ps h -C ndo2db -o pid`
                if [ -z "$NdoPID" ]; then
                        echo "     No ndo2db process found"
                        exit 1
                else
                        echo "     found process pid: $NdoPID"
                        echo -n "         reinit $NdoRunFile ..."
                        touch $NdoRunFile
                        chown $NdoUser:$NdoGroup $NdoRunFile
                        echo "$NdoPID" > $NdoRunFile
                        echo "     done"
                fi
        fi

        NdoPID=`head $NdoRunFile`
}

# Source function library
# Solaris doesn't have an rc.d directory, so do a test first
if [ -f /etc/rc.d/init.d/functions ]; then
        . /etc/rc.d/init.d/functions
elif [ -f /etc/init.d/functions ]; then
        . /etc/init.d/functions
fi

prefix=/usr/local/nagios
exec_prefix=${prefix}
NdoBin=${exec_prefix}/bin/ndo2db
NdoCfgFile=${prefix}/etc/ndo2db.cfg
NdoRunFile=${prefix}/var/ndo2db.run
NdoLockDir=/var/lock/subsys
NdoLockFile=ndo2db.lock
NdoUser=nagios
NdoGroup=nagios

# Check that ndo exists.
if [ ! -f $NdoBin ]; then
   echo "Executable file $NdoBin not found.  Exiting."
   exit 1
fi

# Check that ndo.cfg exists.
if [ ! -f $NdoCfgFile ]; then
   echo "Configuration file $NdoCfgFile not found.  Exiting."
   exit 1
fi

# See how we were called.
case "$1" in

        start)
                echo -n "Starting ndo:"
                touch $NdoRunFile
                chown $NdoUser:$NdoGroup $NdoRunFile
                $NdoBin -c $NdoCfgFile
                if [ -d $NdoLockDir ]; then
                        touch $NdoLockDir/$NdoLockFile;
                fi
                ps h -C ndo2db -o pid > $NdoRunFile
                if [ $? -eq 0 ]; then
                        echo " done."
                        exit 0
                else
                        echo " failed."
                        $0 stop
                        exit 1
                fi
                ;;

        stop)
                echo -n "Stopping ndo: "

                pid_ndo
                killproc_ndo

                # now we have to wait for ndo to exit and remove its
                # own NdoRunFile, otherwise a following "start" could
                # happen, and then the exiting ndo will remove the
                # new NdoRunFile, allowing multiple ndo daemons
                # to (sooner or later) run
                #echo -n 'Waiting for ndo to exit .'
                for i in 1 2 3 4 5 6 7 8 9 10 ; do
                    if status_ndo > /dev/null; then
                        echo -n '.'
                        sleep 1
                    else
                        break
                    fi
                done
                if status_ndo > /dev/null; then
                    echo
                    echo 'Warning - ndo did not exit in a timely manner'
                else
                    echo 'done.'
                fi

                rm -f $NdoRunFile $NdoLockDir/$NdoLockFile
                ;;

        status)
                pid_ndo
                printstatus_ndo ndo
                ;;

        restart)
                $0 stop
                $0 start
                ;;

        *)
                echo "Usage: ndo {start|stop|restart|status}"
                exit 1
                ;;
esac
# End of this script

change the owner, rights and add the job to autostart:

sudo chown root:root /etc/init.d/ndo2db
sudo chmod +x /etc/init.d/ndo2db
sudo update-rc.d ndo2db defaults

You could now realy proceed to Centreon installation section.
Download sources:

cd /usr/local/src/
sudo wget http://download.centreon.com/index.php?id=134
sudo tar -xzf centreon-2.1.6.tar.gz
cd centreon-2.1.6
export PATH="$PATH:/usr/local/nagios/bin/"
sudo ./install.sh -i

Please proceed as follow:

###############################################################################
#                                                                             #
#                         Centreon (www.centreon.com)                         #
#                          Thanks for using Centreon                          #
#                                                                             #
#                                    v2.1                                     #
#                                                                             #
#                              infos@centreon.com                             #
#                                                                             #
#                   Make sure you have installed and configured               #
#                   sudo - sed - php - apache - rrdtool - mysql               #
#                                                                             #
###############################################################################
------------------------------------------------------------------------
Checking all needed binaries
------------------------------------------------------------------------
rm                                                         OK
cp                                                         OK
mv                                                         OK
/bin/chmod                                                 OK
/bin/chown                                                 OK
echo                                                       OK
more                                                       OK
mkdir                                                      OK
find                                                       OK
/bin/grep                                                  OK
/bin/cat                                                   OK
/bin/sed                                                   OK

You will now read Centreon Licence.
Press enter to continue.q pour quitter le readme

Accept the license.

------------------------------------------------------------------------
Please choose what you want to install
------------------------------------------------------------------------

Do you want to install : Centreon Web Front
[y/n], default to [n]:
> y

Do you want to install : Centreon CentCore
[y/n], default to [n]:
> y

Do you want to install : Centreon Nagios Plugins
[y/n], default to [n]:
> y

Do you want to install : Centreon Snmp Traps process
[y/n], default to [n]:
> y

------------------------------------------------------------------------
Start CentWeb Installation
------------------------------------------------------------------------

Where is your Centreon directory?
default to [/usr/local/centreon]
> 

Do you want me to create this directory ? [/usr/local/centreon]
[y/n], default to [n]:
> y
Path /usr/local/centreon                                   OK

Where is your Centreon log directory
default to [/usr/local/centreon/log]
> 

Do you want me to create this directory ? [/usr/local/centreon/log]
[y/n], default to [n]:
> y
Path /usr/local/centreon/log                               OK

Where is your Centreon etc directory
default to [/etc/centreon]
> 

Do you want me to create this directory ? [/etc/centreon]
[y/n], default to [n]:
> y
Path /etc/centreon                                         OK

Where is your Centreon generation_files directory?
default to [/usr/local/centreon]
> 
Path /usr/local/centreon                                   OK

Where is your Centreon variable library directory?
default to [/var/lib/centreon]

Where is your Centreon variable library directory?
default to [/var/lib/centreon]
> 

Do you want me to create this directory ? [/var/lib/centreon]
[y/n], default to [n]:
> y
Path /var/lib/centreon                                     OK

Where is your CentPlugins Traps binary
default to [/usr/local/centreon/bin]
> 

Do you want me to create this directory ? [/usr/local/centreon/bin]
[y/n], default to [n]:
> y
Path /usr/local/centreon/bin                               OK

Where is the RRD perl module installed [RRDs.pm]
default to [/usr/lib/perl5/RRDs.pm]
> 
Path /usr/lib/perl5                                        OK
/usr/bin/rrdtool                                           OK
/usr/bin/mail                                              OK

Where is PEAR [PEAR.php]
default to [/usr/share/php/PEAR.php]
> 
Path /usr/share/php                                        OK

Where is installed Nagios ?
default to [/usr/local/nagios]
> 
Path /usr/local/nagios                                     OK

Where is your nagios config directory
default to [/usr/local/nagios/etc]
> 
Path /usr/local/nagios/etc                                 OK

Where is your Nagios var directory ?
default to [/usr/local/nagios/var]
> 
Path /usr/local/nagios/var                                 OK

Where is your Nagios plugins (libexec) directory ?
default to [/usr/local/nagios/libexec]
> 
Path /usr/local/nagios/libexec                             OK

Where is your nagios binary ?
default to [/usr/local/nagios/bin/nagios]
> 
/usr/local/nagios/bin/nagios                               OK

Where is your Nagios image directory ?
default to [/usr/local/nagios/share/images/logos]
> 
Path /usr/local/nagios/share/images/logos                  OK

Where is your nagiostats binary ?
default to [/usr/local/nagios/bin/nagiostats]
> 
/usr/local/nagios/bin/nagiostats                           OK
p1_file : /usr/local/nagios/bin/p1.pl                      OK
/usr/bin/php                                               OK
/usr/bin/perl                                              OK
Finding Apache group :                                     www-data
Finding Apache user :                                      www-data
Finding Nagios user :                                      nagios
Finding Nagios group :                                     nagios

Please change the location:

Where is your NDO ndomod binary ?
default to [/usr/sbin/ndomod.o]
> /usr/local/nagios/bin/ndomod.o

Continue the install process:

------------------------------------------------------------------------
Configure Sudo
------------------------------------------------------------------------

Where is sudo configuration file
default to [/etc/sudoers]
>
/etc/sudoers                                               OK
Nagios init script                                         OK
Your sudo is not configured

Do you want me to configure your sudo ? (WARNING)
[y/n], default to [n]:
> y
Configuring Sudo                                           OK

------------------------------------------------------------------------
Configure Apache server
------------------------------------------------------------------------

Do you want to add Centreon Apache sub configuration file ?
[y/n], default to [n]:
> y
Create '/etc/apache2/conf.d/centreon.conf'                 OK
Configuring Apache                                         OK

Do you want to reload your Apache ?
[y/n], default to [n]:
> y
Reloading Apache service                                   OK
Preparing Centreon temporary files
Change right on /usr/local/centreon/log                    OK
Change right on /etc/centreon                              OK
Change right on /usr/local/nagios/share/images/logos       OK
Install nagios documentation                               OK
Change macros for insertBaseConf.sql                       OK
Change macros for php files
Change macros for php files                                OK
Change right on /usr/local/nagios/etc                      OK
Copy CentWeb in system directory
Install CentWeb (web front of centreon)                    OK
Install libraries                                          OK
Copying libinstall                                         OK
Change macros for centreon.cron                            OK
Install Centreon cron.d file                               OK
Change macros for archiveDayLog                            OK
Change macros for centAcl.php                              OK
Install cron directory                                     OK

------------------------------------------------------------------------
Pear Modules
------------------------------------------------------------------------
Check PEAR modules
PEAR                            1.4.9       1.6.1          OK
DB                              1.7.6                      NOK
DB_DataObject                   1.8.4                      NOK
DB_DataObject_FormBuilder       1.0.0RC4                   NOK
MDB2                            2.0.0                      NOK
Date                            1.4.6                      NOK
HTML_Common                     1.2.2                      NOK
HTML_QuickForm                  3.2.5                      NOK
HTML_QuickForm_advmultiselect   1.1.0                      NOK
HTML_Table                      1.6.1                      NOK
Archive_Tar                     1.1         1.3.2          OK
Auth_SASL                       1.0.1                      NOK
Console_Getopt                  1.2         1.2.3          OK
Net_SMTP                        1.2.8                      NOK
Net_Socket                      1.0.1                      NOK
Net_Traceroute                  0.21                       NOK
Net_Ping                        2.4.1                      NOK
Validate                        0.6.2                      NOK
XML_RPC                         1.4.5                      NOK
SOAP                            0.10.1                     NOK
Log                             1.9.11                     NOK

Do you want me to install/upgrade your PEAR modules
[y/n], default to [y]:
> y
Upgrading PEAR modules
Installing PEAR modules
DB                              1.7.6       1.7.13         OK
DB_DataObject                   1.8.4       1.9.3          OK
DB_DataObject_FormBuilder       1.0.0RC4    1.0.0          OK
MDB2                            2.0.0       2.4.1          OK
HTML_QuickForm_advmultiselect   1.1.0       1.5.1          OK
HTML_Table                      1.6.1       1.8.3          OK
Auth_SASL                       1.0.1       1.0.4          OK
Net_SMTP                        1.2.8       1.4.2          OK
Net_Traceroute                  0.21        0.21.2         OK
Net_Ping                        2.4.1       2.4.5          OK
Validate                        0.6.2       0.8.3          OK
XML_RPC                         1.4.5       1.5.3          OK
SOAP                            0.10.1      0.12.0         OK
Log                             1.9.11      1.12.0         OK
Check PEAR modules
PEAR                            1.4.9       1.6.1          OK
DB                              1.7.6       1.7.13         OK
DB_DataObject                   1.8.4       1.9.3          OK
DB_DataObject_FormBuilder       1.0.0RC4    1.0.0          OK
MDB2                            2.0.0       2.4.1          OK
Date                            1.4.6       1.4.7          OK
HTML_Common                     1.2.2       1.2.5          OK
HTML_QuickForm                  3.2.5       3.2.11         OK
HTML_QuickForm_advmultiselect   1.1.0       1.5.1          OK
HTML_Table                      1.6.1       1.8.3          OK
Archive_Tar                     1.1         1.3.2          OK
Auth_SASL                       1.0.1       1.0.4          OK
Console_Getopt                  1.2         1.2.3          OK
Net_SMTP                        1.2.8       1.4.2          OK
Net_Socket                      1.0.1       1.0.9          OK
Net_Traceroute                  0.21        0.21.2         OK
Net_Ping                        2.4.1       2.4.5          OK
Validate                        0.6.2       0.8.3          OK
XML_RPC                         1.4.5       1.5.3          OK
SOAP                            0.10.1      0.12.0         OK
Log                             1.9.11      1.12.0         OK
All PEAR modules                                           OK

------------------------------------------------------------------------
Centreon Post Install
------------------------------------------------------------------------
Create /usr/local/centreon/www/install/install.conf.php    OK
Create /etc/centreon/instCentWeb.conf                      OK

------------------------------------------------------------------------
Start CentStorage Installation
------------------------------------------------------------------------

Where is your Centreon Run Dir directory?
default to [/var/run/centreon]
> 

Do you want me to create this directory ? [/var/run/centreon]
[y/n], default to [n]:
> y
Path /var/run/centreon                                     OK

Where is your CentStorage binary directory
default to [/usr/local/centreon/bin]
> 
Path /usr/local/centreon/bin                               OK

Where is your CentStorage RRD directory
default to [/var/lib/centreon]
> 
Path /var/lib/centreon                                     OK
Finding Nagios group :                                     nagios
Finding Nagios user :                                      nagios
Preparing Centreon temporary files
/tmp/centreon-setup exists, it will be moved...
install www/install/createTablesCentstorage.sql            OK
Creating Centreon Directory '/var/lib/centreon/status'     OK
Creating Centreon Directory '/var/lib/centreon/metrics'    OK
Change macros for centstorage binary                       OK
Install CentStorage binary                                 OK
Install library for centstorage                            OK
Change right : /var/run/centreon                           OK
Change macros for centstorage init script                  OK

Do you want me to install CentStorage init script ?
[y/n], default to [n]:
> y
CentStorage init script installed                          OK

Do you want me to install CentStorage run level ?
[y/n], default to [n]:
> y
Adding system startup for /etc/init.d/centstorage ...
/etc/rc0.d/K30centstorage -> ../init.d/centstorage
/etc/rc1.d/K30centstorage -> ../init.d/centstorage
/etc/rc6.d/K30centstorage -> ../init.d/centstorage
/etc/rc2.d/S40centstorage -> ../init.d/centstorage
/etc/rc3.d/S40centstorage -> ../init.d/centstorage
/etc/rc4.d/S40centstorage -> ../init.d/centstorage
/etc/rc5.d/S40centstorage -> ../init.d/centstorage
Change macros for logAnalyser                              OK
Install logAnalyser                                        OK
Change macros for nagiosPerfTrace                          OK
Install nagiosPerfTrace                                    OK
Change macros for purgeLogs                                OK
Install purgeLogs                                          OK
Change macros for purgeCentstorage                         OK
Install purgeCentstorage                                   OK
Change macros for centreonPurge.sh                         OK
Install centreonPurge.sh                                   OK
Change macros for centstorage.cron                         OK
Install CentStorage cron                                   OK
Create /etc/centreon/instCentStorage.conf                  OK

------------------------------------------------------------------------
Start CentCore Installation
------------------------------------------------------------------------

Where is your CentCore binary directory
default to [/usr/local/centreon/bin]
> 
Path /usr/local/centreon/bin                               OK
/usr/bin/ssh                                               OK
/usr/bin/scp                                               OK
Finding Nagios group :                                     nagios
Finding Nagios user :                                      nagios
Preparing Centreon temporary files
/tmp/centreon-setup exists, it will be moved...
Change CentCore Macro                                      OK
Copy CentCore in binary directory                          OK
Change right : /var/run/centreon                           OK
Change right : /var/lib/centreon                           OK
Replace CentCore init script Macro                         OK

Do you want me to install CentCore init script ?
[y/n], default to [n]:
> y
CentCore init script installed                             OK

Do you want me to install CentCore run level ?
[y/n], default to [n]:
> y
Adding system startup for /etc/init.d/centcore ...
/etc/rc0.d/K30centcore -> ../init.d/centcore
/etc/rc1.d/K30centcore -> ../init.d/centcore
/etc/rc6.d/K30centcore -> ../init.d/centcore
/etc/rc2.d/S40centcore -> ../init.d/centcore
/etc/rc3.d/S40centcore -> ../init.d/centcore
/etc/rc4.d/S40centcore -> ../init.d/centcore
/etc/rc5.d/S40centcore -> ../init.d/centcore
Create /etc/centreon/instCentCore.conf                     OK

------------------------------------------------------------------------
Start CentPlugins Installation
------------------------------------------------------------------------

Where is your CentPlugins lib directory
default to [/var/lib/centreon/centplugins]
> 

Do you want me to create this directory ? [/var/lib/centreon/centplugins]
[y/n], default to [n]:
> y
Path /var/lib/centreon/centplugins                         OK
Finding Nagios user :                                      nagios
Finding Nagios group :                                     nagios
Preparing Centreon temporary files
/tmp/centreon-setup exists, it will be moved...
Change macros for CentPlugins                              OK
Installing the plugins                                     OK
Change right on centreon.conf                              OK
CentPlugins is installed

------------------------------------------------------------------------
Start CentPlugins Traps Installation
------------------------------------------------------------------------

Where is your SNMP configuration directory
default to [/etc/snmp]
> 
/etc/snmp                                                  OK

Where is your SNMPTT binaries directory
default to [/usr/local/centreon/bin/]
> 
/usr/local/centreon/bin/                                   OK
Finding Nagios group :                                     nagios
Finding Apache user :                                      www-data
Preparing Centreon temporary files
/tmp/centreon-setup exists, it will be moved...
Change macros for CentPluginsTraps                         OK
Installing the plugins Trap binaries                       OK
Backup all your snmp files                                 OK
Change macros for snmptrapd.conf                           OK
Change macros for snmptt.ini                               OK
Install : snmptrapd.conf                                   OK
Install : snmp.conf                                        OK
Install : snmptt.ini                                       OK
Install : snmptt                                           OK
Install : snmpttconvertmib                                 OK
Create /etc/centreon/instCentPlugins.conf                  OK
###############################################################################
#                                                                             #
#                 Go to the URL : http://your-server/centreon/                #
#                            to finish the setup                              #
#                                                                             #
#                  Report bugs at http://forge.centreon.com                   #
#                                                                             #
#                         Thanks for using Centreon.                          #
#                          -----------------------                            #
#                        Contact : infos@centreon.com                         #
#                          http://www.centreon.com                            #
#                                                                             #
###############################################################################

Initialise the NDO database

mysql -u root --password=mysqlcentaccess ndo < ./www/install/createNDODB.sql
mysql -u root --password=mysqlcentaccess
mysql> GRANT SELECT , INSERT , UPDATE , DELETE ON ndo . * TO ndouser@localhost IDENTIFIED BY "ndopassword"; FLUSH PRIVILEGES;
mysql> exit

Reload your web server

sudo service apache2 reload

We will finalise the installation process in the next post.

Connect to your web interface: by default, it’s http://YOUR_SERVER_IP_ADDRESS/centreon

Proceed as follow:

For picture 6 use mysqlcentaccess03 as Mysql Root password and mysqlcentdb03 for the mysql database password

For picture 8 use admin and actwebaccess03 for Centreon Web Access.

PS: Some versions should differ from your screenshots as it was taken from the previous post (Ubuntu 8.04 LTS)

Optimise your setup:

After saving prepare yourself for your first export 🙂
note: I don’t know why the service ‘Disk-/’ on Centreon-Server wont work with 127.0.0.1
If you want to correct this, edit the host and change the ip address 127.0.0.1 with localhost. If you plan to check your central server from a pooler, set back the real IP adress.

You should see no errors at all. This time export for real the settings:

Reboot your monitoring system. After loging back you should see Centreon monitoring itself (you’ll have to wait approximatively 5 minutes to see all graphs generated).

  51 Responses to “Ubuntu Server 10.04 LTS with Nagios 3.2.1 and Centreon 2.1.6”

  1. Hi dalmatina

    You probably have problem with your local time. I suppose you use NTP on linux to set correctly your time. Maybe it differ from your Hyper-v time too…

    Regards