EN_installation_guide_for_centreon-discovery_v0.1b.pdf

Embed Size (px)

Citation preview

  • 8/10/2019 EN_installation_guide_for_centreon-discovery_v0.1b.pdf

    1/14

    Centreon-DiscoveryInstallation guide

    ALAMI BtissameALAMI ZinebCOUST FranoisDIETRICH NicolasGAZUI BaptisteHANS Guillaume

    PROTHIN Hugo

    February 2012

    ESIEE Engineering

  • 8/10/2019 EN_installation_guide_for_centreon-discovery_v0.1b.pdf

    2/14

    Page 1 /14

    Projet CentreondiscoveryInstallation guide

    Projet I5FR ESIEE 2012Installation Centreon-Discovery 2012

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

  • 8/10/2019 EN_installation_guide_for_centreon-discovery_v0.1b.pdf

    3/14

    Page 2 /14

    Projet CentreondiscoveryInstallation guide

    Projet I5FR ESIEE 2012Installation 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 userguide 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 monitorhosts in a distributed architecture. A Discovery agent poller is installed on eachremote poller and communicates with a Discovery agent Central present on thecentral site.

    Eventually, it will be possible to secure the data exchange between these twoagents using AES encryption.

    Architecture diagram

    Figure 1 possible architectures

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

  • 8/10/2019 EN_installation_guide_for_centreon-discovery_v0.1b.pdf

    4/14

    Page 3 /14

    Projet CentreondiscoveryInstallation guide

    Projet I5FR ESIEE 2012Installation 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 BothCentreon v2.3 X - XPython v2.6 X X XPython-dev X X XNmap >=5.00 - X XMySQL-dev X - Xgcc X - X

    II. Preparation

    Module download

    Once your Linux system is ready for Centreon-Discovery module, go to theCentreon 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 thesubversion 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 archiveusing 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 thiswriting: version 2.01).

  • 8/10/2019 EN_installation_guide_for_centreon-discovery_v0.1b.pdf

    5/14

    Page 4 /14

    Projet CentreondiscoveryInstallation guide

    Projet I5FR ESIEE 2012Installation Centreon-Discovery 2012

    Archive extraction

    If you downloaded the tarball from the website (without using SVN), you mustthen 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, pollerand both. To installthe 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 yourkeyboard. The installation script will suggest you some default choices (proposed

    between "[ ]"). You can press the "Enter" key on your keyboard to use the defaultproposition. You also can specify a different installation path your choice using yourkeyboard.

    Mode Central

    Installation example for Central mode:

    # ./install.sh -i -t central

    Once the command is executed, the file "install.sh" verifies that all requiredbinaries 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 theinstallation. See software requirements page 2.

    -----------------------------------------------------------------

    Checking all needed binaries

    -----------------------------------------------------------------

    rm OK

    cp OK

    mv OK

    /bin/chmod OK

    /bin/chown OK

    echo OK

  • 8/10/2019 EN_installation_guide_for_centreon-discovery_v0.1b.pdf

    6/14

    Page 5 /14

    Projet CentreondiscoveryInstallation guide

    Projet I5FR ESIEE 2012Installation 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 theGPL module.

    Then you must specify the path of Centreon configuration files. A failure to loadthese 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

  • 8/10/2019 EN_installation_guide_for_centreon-discovery_v0.1b.pdf

    7/14

  • 8/10/2019 EN_installation_guide_for_centreon-discovery_v0.1b.pdf

    8/14

    Page 7 /14

    Projet CentreondiscoveryInstallation guide

    Projet I5FR ESIEE 2012Installation Centreon-Discovery 2012

    Centreon-Discoveryinstallation 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 requiredbinaries and packages are installed on the machine. If one of them is missing, theinstallation is cancelled.

    The user must install the, missing files and packages before continuing theinstallation. 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

  • 8/10/2019 EN_installation_guide_for_centreon-discovery_v0.1b.pdf

    9/14

    Page 8 /14

    Projet CentreondiscoveryInstallation guide

    Projet I5FR ESIEE 2012Installation 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 acceptthe 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 #

    # #

    ###########################################################################

  • 8/10/2019 EN_installation_guide_for_centreon-discovery_v0.1b.pdf

    10/14

  • 8/10/2019 EN_installation_guide_for_centreon-discovery_v0.1b.pdf

    11/14

    Page 10 /14

    Projet CentreondiscoveryInstallation guide

    Projet I5FR ESIEE 2012Installation Centreon-Discovery 2012

    Thenthe script will install the necessary Python libraries:

    ------------------------------------------------------------------------

    Install Python Modules

    ------------------------------------------------------------------------

    Module NMAP ... OK

    Module SetupTools ... OKModule 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

  • 8/10/2019 EN_installation_guide_for_centreon-discovery_v0.1b.pdf

    12/14

    Page 11 /14

    Projet CentreondiscoveryInstallation guide

    Projet I5FR ESIEE 2012Installation 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/newUse the following command to verify that the DiscoveryAgent_polleris 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 theURL: http://[IP]/centreonto complete the installation of Centreon-Discovery module.

    After authentication, the module Centreon-Discovery appears in the list of noninstalled 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

  • 8/10/2019 EN_installation_guide_for_centreon-discovery_v0.1b.pdf

    13/14

    Page 12 /14

    Projet CentreondiscoveryInstallation guide

    Projet I5FR ESIEE 2012Installation Centreon-Discovery 2012

    Read the instructions and click on "Install module:

    Figure 7 Centreon-Discovery installation module

    Centreon-Discoveryinstallation module ends with the figure below:

    Figure 8 Installation successful message

    Verifying that Centreon-Discovery module is properly installed:

    Figure 9 Checking module status

  • 8/10/2019 EN_installation_guide_for_centreon-discovery_v0.1b.pdf

    14/14

    Page 13 /14

    Projet CentreondiscoveryInstallation guide

    Projet I5FR ESIEE 2012Installation 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 Centralthe 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 frompoller(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" --> columnlocalhost = YES)

    V. Useful links:

    Centreon-Discovery

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

    Centreon

    Wiki: http://doc.centreon.comSVN: http://svn.centreon.comForum: http://forum.centreon.com