Вы находитесь на странице: 1из 14

Centreon-Discovery

Installation guide

ALAMI Btissame
ALAMI Zineb
COUST Franois
DIETRICH Nicolas
GAZUI Baptiste
HANS Guillaume
PROTHIN Hugo
February 2012
ESIEE Engineering



Page 1 /14

Projet Centreondiscovery
Installation guide

Projet I5FR ESIEE 2012
Installation Centreon-Discovery 2012

Summary
I. Introduction..........................................................................2
Architecture diagram................................................................ 2
Software requirements ............................................................. 3
II. Preparation...........................................................................3
Module download...................................................................... 3
Archive extraction..................................................................... 4
Running installation script ....................................................... 4
III. Installation............................................................................4
Mode Central ....................................................................... 4
Mode Poller .......................................................................... 7
Mode Both ............................................................................ 9
IV. FAQ.....................................................................................13
V. Useful links: .......................................................................13




Page 2 /14

Projet Centreondiscovery
Installation guide

Projet I5FR ESIEE 2012
Installation Centreon-Discovery 2012
I. Introduction
The aim of this document is to help user through the installation of Centreon-
Discovery module in a Nagios/Centreon environment. Another document user
guide will detail and explain how to use this module.
This guide has been validated for the following Linux distributions:
CentOS 5.6 (FAN)
Debian 6 (Squeeze)

Centreon-Discovery module is designed to automatically discover and monitor
hosts in a distributed architecture. A Discovery agent poller is installed on each
remote poller and communicates with a Discovery agent Central present on the
central site.
Eventually, it will be possible to secure the data exchange between these two
agents using AES encryption.
Architecture diagram

Figure 1 possible architectures

Afterward, you will need to choose an installation mode according to your
architecture, it is important to understanding the diagram in Figure 1. Further
explanations "text" is available in the FAQ section of this document.





Page 3 /14

Projet Centreondiscovery
Installation guide

Projet I5FR ESIEE 2012
Installation Centreon-Discovery 2012
The installation takes about 10min, regardless the installation mode chosen.
Software requirements
The Centreon-discovery module installation mode requires the installation of
some packages tailored to each mode: Central, Poller or Both.
Installation mode
Software requirements Central Poller Both
Centreon v2.3 X - X
Python v2.6 X X X
Python-dev X X X
Nmap >=5.00 - X X
MySQL-dev X - X
gcc X - X
II. Preparation
Module download
Once your Linux system is ready for Centreon-Discovery module, go to the
Centreon community link below:
http://community.centreon.com/projects/centreon-discovery
The Centreon-Discovery module can be downloaded directly at this address
(at this point authentication is required):
http://community.centreon.com/attachments/download/693/centreon-discovery-
2.01.tar.gz
If your Linux server does not have a graphic layer, you must install the
subversion package in order to download the module.
On CentOS:
# yum update
# yum install subversion
On Debian:
# apt-get update
# apt-get install subversion
Once the subversion present, you can download the contents of the archive
using the following command:
# svn checkout http://svn.modules.centreon.com/centreon-
discovery/tags/Centreon-Discovery-2.01/
Note: remember to always download the latest stable version of the module (at this
writing: version 2.01).



Page 4 /14

Projet Centreondiscovery
Installation guide

Projet I5FR ESIEE 2012
Installation Centreon-Discovery 2012
Archive extraction
If you downloaded the tarball from the website (without using SVN), you must
then decompress:
# tar xzf Centreon-Discovery-x.Xx.tar.gz
Running installation script
Once the archive is decompressed in the folder Centreon-Discovery, open it.
Then give the execution rights for the file name install.sh to run it:
# chmod u+x install.sh
This script allows three types of installations: central, poller and both. To install
the mode you want, put the following options:
# ./install.sh -i -t central
# ./install.sh -i -t poller
# ./install.sh -i -t both

"-i" to specify that you wish to install the module.
"-t" to specify the installation mode.
III. Installation
While running the installation script, you will be required to interact with your
keyboard. The installation script will suggest you some default choices (proposed
between "[ ]"). You can press the "Enter" key on your keyboard to use the default
proposition. You also can specify a different installation path your choice using your
keyboard.
Mode Central
Installation example for Central mode:
# ./install.sh -i -t central
Once the command is executed, the file "install.sh" verifies that all required
binaries and packages are installed on the machine. If one of them is missing, the
installation is cancelled.
The user must install the, missing files and packages before continuing the
installation. See software requirements page 2.
-----------------------------------------------------------------
Checking all needed binaries
-----------------------------------------------------------------
rm OK
cp OK
mv OK
/bin/chmod OK
/bin/chown OK
echo OK



Page 5 /14

Projet Centreondiscovery
Installation guide

Projet I5FR ESIEE 2012
Installation Centreon-Discovery 2012
more OK
mkdir OK
find OK
/bin/grep OK
/bin/cat OK
/bin/sed OK
/usr/bin/python OK
/usr/bin/gcc OK
/usr/bin/dpkg OK
-----------------------------------------------------------------
Checking all needed packages
-----------------------------------------------------------------
python-dev OK
libmysqlclient-dev OK

Once the inspection step is completed successfully, you must read and accept the
GPL module.
Then you must specify the path of Centreon configuration files. A failure to load
these files will block the installation:
------------------------------------------------------------------------
Load parameters
------------------------------------------------------------------------
Please specify the directory with contain "instCentWeb.conf"
[/etc/centreon]
>
Parameters were loaded with success OK
Then,the script will install the necessary Python libraries:
------------------------------------------------------------------------
Install Python Modules
------------------------------------------------------------------------
Module SetupTools ... OK
Module MySQLdb ... OK
Next You have to specify a location to install the agent:
------------------------------------------------------------------------
Install Discovery Agent
------------------------------------------------------------------------
Creating temp install directory OK
Where do you want to install Discovery Agent ? [/usr/share/centreon-
discovery]
>
Once these steps are completed, the installation directly terminates:
Creating temp install directory OK
Setting rights OK
Setting owner/group OK
Changing macro
for update.php OK
for verif_discovery_status.php OK
for ips.php OK
for results.php OK
for refresh_result.php OK
for install.sql OK
for uninstall.sql OK



Page 6 /14

Projet Centreondiscovery
Installation guide

Projet I5FR ESIEE 2012
Installation Centreon-Discovery 2012
Create a directory to backup old files OK
Backup old installation OK
Copying module OK
Delete temp install directory OK
The Centreon Module Discovery.2.01 installation is finishedOK
See README and the log file for more details.
###########################################################################
# #
# Go to the URL : http://your-server/centreon/ #
# to finish the setup #
# #
# Report bugs at #
# http://community.centreon.com/projects/centreon-discovery/issues/new #
# #
###########################################################################
If you face a problem during installation, please visit the community site:
http://community.centreon.com/projects/centreondiscovery/issues/new
To end the installation, you have to go on the Centreon Web interface, with the
URL: http://[IP]/centreon to complete the installation of Centreon-Discovery module.
After authentication, the module Centreon-Discovery appears in the list of non
installed modules in the tab: Administration> Modules> Centreon-Discovery.
To install the module click on the icon present in the column:

Figure 2 Centreon module list
Read the instructions and click on "Install module":

Figure 3 Centreon-Discovery installation module



Page 7 /14

Projet Centreondiscovery
Installation guide

Projet I5FR ESIEE 2012
Installation Centreon-Discovery 2012
Centreon-Discovery installation module ends with the figure below:

Figure 4 Installation successful message
Verifying that Centreon-Discovery module is properly installed:

Figure 5 Checking mudule status
Mode Poller
Installation example for Poller mode:
# ./install.sh -i -t poller
Once the command is executed, the file "install.sh" verifies that all required
binaries and packages are installed on the machine. If one of them is missing, the
installation is cancelled.
The user must install the, missing files and packages before continuing the
installation. See software requirement page 2.
------------------------------------------------------------------------
Checking all needed binaries
------------------------------------------------------------------------
rm OK
cp OK
mv OK
/bin/chmod OK
/bin/chown OK
echo OK
more OK
mkdir OK
find OK



Page 8 /14

Projet Centreondiscovery
Installation guide

Projet I5FR ESIEE 2012
Installation Centreon-Discovery 2012
/bin/grep OK
/bin/cat OK
/bin/sed OK
/usr/bin/python OK
/usr/bin/gcc OK
/usr/local/bin/nmap OK
/usr/bin/dpkg OK
------------------------------------------------------------------------
Checking all needed packages
------------------------------------------------------------------------
python-dev OK
Once the inspection step is completed successfully, you must read and accept
the GPL module.
Next, the script will install the required Python libraries:
------------------------------------------------------------------------
Install Python Modules
------------------------------------------------------------------------
Module NMAP ... OK
In a first time, you'll need to specify a location to install the agent poller:
------------------------------------------------------------------------
Install Discovery Agent
------------------------------------------------------------------------
Where do you want to install Discovery Agent ?
[/usr/share/centreon-discovery]
>
Agent installation in run level:
Do you want to install discovery-agent run level ?
[y/n], default to [y]:
> y Changing macro for init script OK
Afterward, you run the poller agent automatically after the installation:
Do you want execute discovery poller agent now ?
[y/n], default to [y]:
> y
Starting discovery agent OK
Delete temp install directory OK
Once these steps completed, the installation directly terminates:
Delete temp install directory OK
The Centreon Module Discovery.2.01 installation is finished OK
See README and the log file for more details.
###########################################################################
# #
# Go to the URL : http://your-server/centreon/ #
# to finish the setup #
# #
# Report bugs at #
# http://community.centreon.com/projects/centreon-discovery/issues/new #
# #
###########################################################################



Page 9 /14

Projet Centreondiscovery
Installation guide

Projet I5FR ESIEE 2012
Installation Centreon-Discovery 2012
If you face a problem during installation, please visit the community site:
http://community.centreon.com/projects/centreondiscovery/issues/new
Use the following command to verify that the DiscoveryAgent_poller is active:
# ps aux | grep DiscoveryAgent_poller
root 13926 3.1 1.9 9624 4960 pts/0 S 16:30 0:00
/usr/bin/python /etc/discovery-poller/DiscoveryAgent_poller.py
root 13935 0.0 0.3 3320 808 pts/0 S+ 16:30 0:00 grep
DiscoveryAgent_poller
Mode Both
Installation example for Both mode:
# ./install.sh -i -t both
Once the command is executed, the file "install.sh" verifies that all required
binaries and packages are installed on the machine. If one of them is missing, the
installation is cancelled.
------------------------------------------------------------------------
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
/usr/bin/python OK
/usr/bin/gcc OK
/usr/local/bin/nmap OK
/usr/bin/dpkg OK
------------------------------------------------------------------------
Checking all needed packages
------------------------------------------------------------------------
python-dev OK
libmysqlclient-dev OK
Once the inspection step is completed successfully, you must read and accept the
GPL module.
Then you must specify the path of Centreon configuration files. A failure to load
these files will block the installation:
------------------------------------------------------------------------
Load parameters
------------------------------------------------------------------------
Please specify the directory with contain "instCentWeb.conf"
[/etc/centreon]
>
Parameters were loaded with success OK



Page 10 /14

Projet Centreondiscovery
Installation guide

Projet I5FR ESIEE 2012
Installation Centreon-Discovery 2012
Then the script will install the necessary Python libraries:
------------------------------------------------------------------------
Install Python Modules
------------------------------------------------------------------------
Module NMAP ... OK
Module SetupTools ... OK
Module MySQLdb ... OK
Next you have to specify a location to install the agent:
------------------------------------------------------------------------
Install Discovery Agent
------------------------------------------------------------------------
Creating temp install directory OK
Where do you want to install Discovery Agent ? [/usr/share/centreon-
discovery]
>
The directory exist. Do you want overwrite it?
[y/n], default to [n]:
> y
Agent installation in run level:
Do you want to install discovery-agent run level ?
[y/n], default to [y]:
> y
Changing macro for init script OK
Copying init script OK
Creating init links OK
Afterward, you run the poller agent automatically after the installation:
Do you want execute discovery poller agent now ?
[y/n], default to [y]:
> y
Starting discovery agent OK
Delete temp install directory OK
Once these steps completed, the installation directly terminates:
Setting rights OK
Setting owner/group OK
Changing macro for DiscoveryAgent_central.py OK
Copy Discovery Agent(s) OK
Delete temp install directory OK

------------------------------------------------------------------------
Install Discovery Module
------------------------------------------------------------------------
Creating temp install directory OK
Setting rights OK
Setting owner/group OK
Changing macro
for update.php OK
for verif_discovery_status.php OK
for refresh_result.php OK
for ips.php OK
for results.php OK
for refresh_result.php OK
for install.sql OK



Page 11 /14

Projet Centreondiscovery
Installation guide

Projet I5FR ESIEE 2012
Installation Centreon-Discovery 2012
for uninstall.sql OK
Create a directory to backup old files OK
Backup old installation OK
Copying module OK
Delete temp install directory OK

The Centreon Module Discovery.2.01 installation is finished
See README and the log file for more details.
###########################################################################
# #
# Go to the URL : http://your-server/centreon/ #
# to finish the setup #
# #
# Report bugs at #
# http://community.centreon.com/projects/centreon-discovery/issues/new #
# #
###########################################################################
If you face a problem during installation, please visit the community site:
http://community.centreon.com/projects/centreondiscovery/issues/new
Use the following command to verify that the DiscoveryAgent_poller is active :
# ps aux | grep DiscoveryAgent_poller
root 13926 3.1 1.9 9624 4960 pts/0 S 16:30 0:00
/usr/bin/python /etc/centreon-discovery/DiscoveryAgent_poller.py
root 13935 0.0 0.3 3320 808 pts/0 S+ 16:30 0:00 grep
DiscoveryAgent_poller
To end the installation, you have to go on the Centreon Web interface, with the
URL: http://[IP]/centreon to complete the installation of Centreon-Discovery module.
After authentication, the module Centreon-Discovery appears in the list of non
installed modules in the tab: Administration> Modules> Centreon-Discovery.
To install the module click on the icon present in the column:


Figure 6 Centreon module list



Page 12 /14

Projet Centreondiscovery
Installation guide

Projet I5FR ESIEE 2012
Installation Centreon-Discovery 2012
Read the instructions and click on "Install module:

Figure 7 Centreon-Discovery installation module
Centreon-Discovery installation module ends with the figure below:

Figure 8 Installation successful message
Verifying that Centreon-Discovery module is properly installed:

Figure 9 Checking module status



Page 13 /14

Projet Centreondiscovery
Installation guide

Projet I5FR ESIEE 2012
Installation Centreon-Discovery 2012
IV. FAQ
Which install type I am into: poller? Central? Or both?

Poller : if you have just Nagios installed on your server and this last sends to Central
the collected informations. Look the list in Centreon interface: "Configuration" -->
"Centreon" --> column localhost = NO)

Central : if you have just Nagios installed on your server and this last receives from
poller(s) the collected informations.

Both : if you have at the same time Nagios and Centreon installed on your server.
Look the list in Centreon interface : "Configuration" --> "Centreon" --> column
localhost = YES)
V. Useful links:
Centreon-Discovery

Documentation: http://community.centreon.com/projects/Centreon-Discovery/documents
SVN: http://svn.modules.centreon.com/centreon-discovery
Forum: http://forum.centreon.com/forumdisplay.php/36-Centreon-discovery-s-modules

Centreon

Wiki: http://doc.centreon.com
SVN: http://svn.centreon.com
Forum: http://forum.centreon.com

Вам также может понравиться