![Stacks Image 4068](files/stacks-image-e9294a1-128x128.png)
1 Préparation de la VM
1.1 Installation des VMtools
sudo apt-get install autoconf gcc-4.3*
- Sélectionner le menu Machine virtuelle / Installer VMware Tools
- Monter le cdrom virtuel sudo mount /dev/cdrom /media/cdrom
- Copier le fichier VMTools dans un répertoire de travail cp /media/cdrom/VMwareTools*.tar.gz .
- Se positionner dans le répertoire personnel de vmubuntu
- Décompresser le fichier VMTools tar xzf VMwareTools*.tar.gz
- Se positionner dans le répertoire cd vmware-tools-distrib/
- Lancer le script sudo ./vmware-install.pl
- Répondre par défaut aux questions (touche entrée)
- Les VMTools doivent s’installer et le cdrom virtuel se démonte automatiquement.
1.2 Installation de ssh
![Voila_Capture2339](files/voila_capture2339.png)
Saisir la commande suivante :
sudo apt-get install ssh
1.3 Pré requis
sudo apt-get install build-essential apache2 wget rrdtool bsd-mailx librrds-perl libapache2-mod-php5 bind9-host dnsutils libbind9-80 libdns81 libisc83 libisccc80 libperl-dev libgd2-noxpm libgd2-noxpm-dev libpng12-dev libjpeg62 libjpeg-dev libjpeg8-dev libjpeg-turbo8-dev mysql-server php5-mysql libmysqlclient15-dev
1.4 Préparation des utilisateurs et groupes
1.4a Création des groupes nagios
sudo /usr/sbin/groupadd nagios sudo /usr/sbin/groupadd nagcmd
1.4b Création de l'utilisateur nagios
sudo /usr/sbin/useradd -g nagios -G nagcmd -d /usr/local/nagios -c "Nagios Admin" nagios
1.4c Ajout du groupe pour apache
sudo /usr/sbin/usermod -G nagios,nagcmd www-data
2 Installation de Nagios
2.1 Compilation
2.1a Récupération des sources Nagios 3.4.1
wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-3.4.1.tar.gz
2.1b Décompression du fichier
tar -xzf nagios-3.4.1.tar.gz
cd nagios
2.1c Compilation et installation
cd
cd nagios
./configure --prefix=/usr/local/nagios --with-nagios-user=nagios --with-nagios-group=nagios --with-command-user=nagios --with-command-group=nagcmd --enable-event-broker --enable-nanosleep --enable-embedded-perl --with-perlcache
make all
sudo make install
sudo make install-init
sudo make install-commandmode
sudo make install-config
2.1d Configuration
Ajoutez au début du fichier /etc/init.d/nagios ces lignes ci-dessous
sudo vi /etc/init.d/nagios
### BEGIN INIT INFO
# Provides: nagios
# Required-Start:
# Required-Stop:
# X-Stop-After:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: nagios
# Description: Supervision Nagios
### END INIT INFO
Lancez la commande
update-rc.d nagios defaults
3 Installation des Plugins pour Nagios
![Stacks Image 60485](files/stacks-image-9bb8dd9.png)
Depuis peu, l’équipe de Centreon a réalisé ses propres plugins en Perl. Ces plugins feront partie intégrante de la nouvelle version de Centreon 3.
3.1 Plugins historiques
3.1a Pré requis
sudo apt-get install libgnutls-dev libssl-dev libkrb5-dev libldap2-dev libsnmp-dev gawk libwrap0-dev libmcrypt-dev smbclient fping gettext dnsutils libmysqlclient-dev libnet-snmp-perl
3.1b Récupération des plugins sur le site de nagios-plugins.org
cd /usr/local/src
sudo wget http://nagios-plugins.org/download/nagios-plugins-2.0.3.tar.gz
sudo tar -xzf nagios-plugins-2.0.3.tar.gz
cd nagios-plugins-2.0.3
3.1c ou sur le site de monitoring-plugins.org
cd /usr/local/src
sudo wget --no-check-certificate https://www.monitoring-plugins.org/download/monitoring-plugins-2.1.1.tar.gz
sudo tar -xzf monitoring-plugins-2.1.1.tar.gz
cd monitoring-plugins-2.1.1
3.1d Compilation et installation
./configure --with-nagios-user=nagios --with-nagios-group=nagios --prefix=/usr/local/nagios/ --enable-perl-modules --with-openssl=/usr/bin/openssl
sudo make
sudo make install
![Stacks Image 60623](files/stacks-image-2782cd4-40x38.png)
L'option enable-perl-modules provoque une erreur de compilation avec le moudle perl Validate.
Validate.xs: In function ‘get_type’:
Validate.xs:208:5: erreur: valeur du « case » duppliquée
Validate.xs:205:5: erreur: previously used here
Validate.xs: In function ‘validate_named_depends’:
Validate.xs:986:15: attention : le format n'est pas une chaîne littérale et pas d'argument de format [-Wformat-security]
make[3]: *** [Validate.o] Erreur 1
make[3]: quittant le répertoire « /home/vmubuntu/nagios-plugins-1.4.16/perlmods/Params-Validate-0.88 »
Can't run make at ../tools/build_perl_modules line 69.
make[2]: *** [all-local] Erreur 2
make[2]: quittant le répertoire « /home/vmubuntu/nagios-plugins-1.4.16/perlmods »
make[1]: *** [all-recursive] Erreur 1
make[1]: quittant le répertoire « /home/vmubuntu/nagios-plugins-1.4.16 »
make: *** [all] Erreur 2
Pas de panique, allez dans le sous-dossier perlmods/Params-Validate-0.88 et lancez la commande :
cd perlmods/Params-Validate-0.88
sudo perl Makefile.PL --pm
Revenir au dossier nagios-plugins-1.4.16 et recommencez la compilation.
3.2 Plugin Centreon
3.2a Pré requis
sudo apt-get install libxml-libxml-perl libjson-perl libwww-perl libxml-xpath-perl libnet-telnet-perl libnet-ntp-perl libnet-dns-perl libdbi-perl libdbd-mysql-perl libdbd-pg-perl -y
3.2b Récupération des plugins sur le dépôt de Centreon
sudo apt-get install git-core
3.2c Installation
cd
git clone https://github.com/centreon/centreon-plugins.git
cd centreon-plugins
chmod +x centreon_plugins.pl
sudo cp -R * /usr/local/plugins/libexec/
4 Installation de l’interface web de Nagios
4.1 Compilation
cd
cd nagios
Installez les fichiers de configuration.
sudo make install-webconf
4.2 Configuration
sudo htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
sudo chown nagios:nagcmd /usr/local/nagios/etc/htpasswd.users
Saisir un mot de passe pour nagiosadmin, pour la maquette on saisira nagios
4.3 Vérification du fonctionnement
sudo service apache2 restart
Démarrer le serveur Nagios
sudo service nagios start
Vérifier le fonctionnement de Nagios avec le navigateur
http://172.16.209.141/nagios/
![](files/install-nagios1.jpg)
Saisir le Nom d’utilisateur nagiosadmin et le mot de passe nagios. Cliquez ensuite sur services vous devriez voir un certain nombre de services ok ou non.
![install-nagios2](files/install-nagios2.png)
C’est terminé, votre installation Nagios est prête. Par contre il manque l’outil de liaison qui vous permettra d’utiliser Centreon. Cet outil permet d’exporter en base de données les diverses données de Nagios s’appelle NdoUtils. Il existe plusieurs solutions :
- L'utilisation du broker historique NDOutils, idéal pour débuter et comprendre le fonctionnement de la supervision.
- L'utilisation du broker Centreon-broker. La compréhension de ce broker est plus ardue mais celui-ci est plus élaboré et est mieux étudié pour les architectures complexes.
- L'utilisation du broker MK livestatus sera réservé à l'utilisation de Nagvis conjointement avec Centreon.
5 Installation de NDOutils
5.1 Compilation et installation
Télechargement du paquet
cd
wget http://surfnet.dl.sourceforge.net/sourceforge/nagios/ndoutils-1.4b9.tar.gz
Décompressez NDOutils et allez dans le répertoire
tar -xzf ndoutils-1.4b9.tar.gz
cd ndoutils-1.4b9
Optionnel mais fortement conseillé, l'optimisation de NDOutils par l’équipe de Centreon
Télécharger le patch
wget http://svn.centreon.com/trunk/ndoutils-patch/ndoutils1.4b9_light.patch
Appliquer le patch
patch -p1 -N < ndoutils1.4b9_light.patch
résultat de la commande
patching file include/common.h
patching file src/ndo2db.c
patching file src/ndomod.c
Compilation et installation
Lancez la préparation à la compilation de NDOutils
./configure --prefix=/usr/local/nagios/ --enable-mysql --disable-pgsql --with-mysql-lib=/usr/lib/mysql/
Vous devriez avoir ce résultat
*** Configuration summary for ndoutils 1.4b9 10-27-2009 ***:
General Options:
-------------------------
NDO2DB user: nagios
NDO2DB group: nagios
Review the options above for accuracy. If they look okay,
type 'make' to compile the NDO utilities.
Compilez NDOutils.
make
Après avoir compilé les binaires et librairies, il faut maintenant les installer. Ici nous allons les installer dans les répertoires de Nagios. Les fichiers de configuration seront copiés aussi.
sudo cp src/ndomod-*.o /usr/local/nagios/bin/
sudo cp src/ndo2db* /usr/local/nagios/bin/
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 chmod 774 /usr/local/nagios/bin/ndo*
sudo chown nagios:nagios /usr/local/nagios/bin/ndo*
sudo chmod 774 /usr/local/nagios/etc/ndomod.cfg
sudo chown nagios:nagios /usr/local/nagios/etc/ndomod.cfg
5.2 Configuration
5.2a Modification du fichier de configuration de Nagios
broker_module=/usr/local/nagios/bin/ndomod-3x.o config_file=/usr/local/nagios/etc/ndomod.cfg
event_broker_options=-1
5.2b Installation du script de démarrage
...
su - $NagiosUser -c "touch $NagiosVarDir/nagios.log $NagiosRetentionFile"
su - $NagiosUser -c "/usr/local/nagios/bin/ndo2db-3x -c /usr/local/nagios/etc/ndo2db.cfg"
rm -f $NagiosCommandFile
...
pid_nagios
killproc_nagios nagios
skill ndo2db-3x
Redémarrage de Nagios
sudo service nagios restart
La seconde est de rajouter le fichier ndo2db dans le dossier /etc/init.d et de le configurer comme ci-dessous. Attention, l'installation de mysql est un pré-requis.
sudo chmod +x /etc/init.d/ndo2db
sudo update-rc.d ndo2db defaults
Démarrage du broker NDOutil
sudo service ndo2db start
Il faut utiliser la seconde solution si vous installer Centreon 2.4.x
5.2c Vérification du fonctionnement de NDOUtils
1er cas, sans ndo2db
![Install_ndo01](files/Install_ndo01.png)
Il faut lire les messages du bas vers le haut. Le process Nagios démarre. Ensuite NDOMOD démarre. La zone bleue indique que le module Event Broker fonctionne sans problème. La zone rouge affiche des messages d'erreur car le service ndo2db n'est pas démarré et par conséquent le module ndomod n'arrive pas à se connecter au flux TCP.
2ème cas, avec ndo2db
![install-nagios4](files/install-nagios4.png)
Il faut lire les messages du bas vers le haut. Le process Nagios démarre. Ensuite NDOMOD démarre. La zone bleue indique que le module Event Broker fonctionne sans problème. La zone rouge affiche des messages d'erreur mais c'est normal, la base n’est pas configurée.
6 Installation du protocole SNMP
6.1 Pré requis
sudo apt-get install snmp snmpd
6.2 Paramétrages
agentAddress udp:localhost:161
rocommunity public localhost
iquerySecName internalUser
rouser internalUser
trapsink localhost public
linkUpDownNotifications yes
# snmpd options (use syslog, close stdin/out/err).
SNMPDOPTS='-LS4d -Lf /dev/null -u snmp -g snmp -I -smux -p /var/run/snmpd.pid'
.....
TRAPDRUN=yes
.....
# snmptrapd options (use syslog).
TRAPDOPTS='-On -Lsd -p /var/run/snmptrapd.pid'
6.3 Installation des mibs
6.3.a Ajout des mibs
sudo apt-get install snmp-mibs-downloader
6.3.b Modification de la configuration SNMP
sudo ln -s /usr/share/mibs/ /usr/share/snmp/mibs
export MIBDIRS=/usr/share/snmp/mibs
export MIBS=ALL
#mibs ALL
sudo service snmpd restart
6.3.c Vérification du fonctionnement
snmpwalk -c public -v 2c localhost
7 Installation de Centreon UI
7.1 Pré requis
sudo apt-get install bsd-mailx mysql-server apache2 php5-mysql rrdtool librrds-perl tofrodos php5 php-pear php5-ldap php5-snmp php5-gd libconfig-inifiles-perl libcrypt-des-perl libdigest-hmac-perl libgd-gd2-perl snmp snmpd
sudo apt-get install phpmyadmin
sudo mv /usr/share/mibs/ietf/IPATM-IPMC-MIB /home/vmubuntu sudo mv /usr/share/mibs/ietf/SNMPv2-PDU /home/vmubuntu sudo mv /usr/share/mibs/ietf/IPSEC-SPD-MIB /home/vmubuntu sudo mv /usr/share/mibs/iana/IANA-IPPM-METRICS-REGISTRY-MIB /home/vmubuntu
7.2 Installation en ligne de commande
cd sudo wget https://s3-eu-west-1.amazonaws.com/centreon-download/public/centreon/centreon-2.5.4.tar.gz sudo tar xzf centreon-2.5.4.tar.gz cd centreon-2.5.4
sudo ./install.sh -i
############################################################################### # # # Centreon (www.centreon.com) # # Thanks for using Centreon # # # # v2.5.0 # # # # 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.
This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. Do you accept GPL license ? [y/n], default to [n]: > y
------------------------------------------------------------------------ Please choose what do 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
Commençons par Centreon Web, l'interface de centreon.
------------------------------------------------------------------------ Start CentWeb Installation ------------------------------------------------------------------------ Where is your Centreon directory? default to [/usr/local/centreon] >
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 binaries directory 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 your Centreon data informations directory default to [/usr/local/centreon/data] > Do you want me to create this directory ? [/usr/local/centreon/data] [y/n], default to [n]: > y Path /usr/local/centreon/data 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] > 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] > 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 /usr/bin/php OK Where is PEAR [PEAR.php] default to [/usr/share/php/PEAR.php] > Path /usr/share/php OK /usr/bin/perl OK Finding Apache user : www-data Finding Apache group : www-data
What is the Centreon group ? [centreon] default to [centreon] > Do you want me to create this group ? [centreon] [y/n], default to [n]: > y What is the Centreon user ? [centreon] default to [centreon] > Do you want me to create this user ? [centreon] [y/n], default to [n]: > y
What is the Monitoring engine user ? > nagios What is the Broker user ? (optional) > nagios What is the Monitoring engine log directory ? > /usr/local/nagios/var Where is your monitoring plugins (libexec) directory ? default to [/usr/lib/nagios/plugins] > /usr/local/nagios/libexec Path /usr/local/nagios/libexec OK Add group centreon to user www-data OK Add group centreon to user nagios OK Add group nagios to user www-data OK Add group nagios to user centreon OK
------------------------------------------------------------------------ Configure Sudo ------------------------------------------------------------------------ Where is sudo configuration file default to [/etc/sudoers] > /etc/sudoers OK What is the Monitoring engine init.d script ? > /etc/init.d/nagios What is the Monitoring engine binary ? > /usr/local/nagios/bin/nagios What is the Monitoring engine configuration directory ? > /usr/local/nagios/etc Where is the configuration directory for broker module ? > /usr/local/nagios/etc Where is the init script for broker module daemon ? > /etc/init.d/ndo2db 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 sql update files OK Change macros for php files OK Change macros for perl binary OK Change right on /usr/local/nagios/etc OK Copy CentWeb in system directory Install CentWeb (web front of centreon) OK Change right for install directory Change right for install directory OK Install libraries OK Write right to Smarty Cache OK Copying libinstall OK Change macros for centreon.cron OK Install Centreon cron.d file OK Change macros for centAcl.php OK Change macros for downtimeManager.php OK Install cron directory OK Change right for eventReportBuilder OK Change right for dashboardBuilder OK Change macros for centreon.logrotate OK Install Centreon logrotate.d file OK Prepare centFillTrapDB OK Install centFillTrapDB OK Prepare centreon_trap_send OK Install centreon_trap_send OK Prepare centreon_check_perfdata OK Install centreon_check_perfdata OK Prepare centreonSyncPlugins OK Install centreonSyncPlugins OK Prepare centreonSyncArchives OK Install centreonSyncArchives OK Install generateSqlLite OK Install changeRrdDsName.pl OK Prepare export-mysql-indexes OK Install export-mysql-indexes OK Prepare import-mysql-indexes OK Install import-mysql-indexes OK Centreon Web Perl lib installed OK ------------------------------------------------------------------------ Pear Modules ------------------------------------------------------------------------ Check PEAR modules PEAR 1.4.9 1.9.4 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.7 OK Auth_SASL 1.0.1 NOK Console_Getopt 1.2 1.3.0 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 Archive_Zip 0.1.2 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.14 OK DB_DataObject 1.8.4 1.11.2 OK DB_DataObject_FormBuilder 1.0.0RC4 1.0.2 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.6 OK Net_SMTP 1.2.8 1.6.2 OK Net_Traceroute 0.21 0.21.3 OK Net_Ping 2.4.1 2.4.5 OK Validate 0.6.2 0.8.5 OK XML_RPC 1.4.5 1.5.5 OK SOAP 0.10.1 0.13.0 OK Log 1.9.11 1.12.7 OK Archive_Zip 0.1.2 0.1.2 OK Check PEAR modules PEAR 1.4.9 1.9.4 OK DB 1.7.6 1.7.14 OK DB_DataObject 1.8.4 1.11.2 OK DB_DataObject_FormBuilder 1.0.0RC4 1.0.2 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.13 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.7 OK Auth_SASL 1.0.1 1.0.6 OK Console_Getopt 1.2 1.3.0 OK Net_SMTP 1.2.8 1.6.2 OK Net_Socket 1.0.1 1.0.14 OK Net_Traceroute 0.21 0.21.3 OK Net_Ping 2.4.1 2.4.5 OK Validate 0.6.2 0.8.5 OK XML_RPC 1.4.5 1.5.5 OK SOAP 0.10.1 0.13.0 OK Log 1.9.11 1.12.7 OK Archive_Zip 0.1.2 0.1.2 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 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 Install CentStorage binary OK Change right : /var/run/centreon OK Change macros for centstorage init script OK Replace CentCore default script Macro OK Do you want me to install CentStorage init script ? [y/n], default to [n]:
> y CentStorage init script installed OK CentStorage default 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 logAnalyser-cbroker OK Install logAnalyser-cbroker 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 Change macros for centstorage.logrotate OK Install Centreon Storage logrotate.d file OK Create /etc/centreon/instCentStorage.conf OK
------------------------------------------------------------------------ Start CentCore Installation ------------------------------------------------------------------------ Where is your CentCore binary directory default to [/usr/local/centreon/bin] > y Path /usr/local/centreon/bin OK /usr/bin/ssh OK /usr/bin/scp OK 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 Change macros for centcore.logrotate OK Install Centreon Core logrotate.d file OK Replace CentCore init script Macro OK Replace CentCore default script Macro OK Do you want me to install CentCore init script ? [y/n], default to [n]: > y CentCore init script installed OK CentCore default 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 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 CentreonTrapd binaries directory default to [/usr/local/centreon/bin] > /usr/local/centreon/bin OK Finding Apache user : www-data Preparing Centreon temporary files /tmp/centreon-setup exists, it will be moved... Change macros for snmptrapd.conf OK Replace CentreonTrapd init script Macro OK Replace CentreonTrapd default script Macro OK Do you want me to install CentreonTrapd init script ? [y/n], default to [n]: > y CentreonTrapd init script installed OK CentreonTrapd default script installed OK Do you want me to install CentreonTrapd run level ? [y/n], default to [n]: > y Adding system startup for /etc/init.d/centreontrapd ... /etc/rc0.d/K30centreontrapd -> ../init.d/centreontrapd /etc/rc1.d/K30centreontrapd -> ../init.d/centreontrapd /etc/rc6.d/K30centreontrapd -> ../init.d/centreontrapd /etc/rc2.d/S40centreontrapd -> ../init.d/centreontrapd /etc/rc3.d/S40centreontrapd -> ../init.d/centreontrapd /etc/rc4.d/S40centreontrapd -> ../init.d/centreontrapd /etc/rc5.d/S40centreontrapd -> ../init.d/centreontrapd trapd Perl lib installed OK Install : snmptrapd.conf OK Install : centreontrapdforward OK Install : centreontrapd OK Create /etc/centreon/instCentPlugins.conf OK ############################################################################### # # # Go to the URL : http://ubuntu/centreon/ # # to finish the setup # # # # Report bugs at http://forge.centreon.com # # # # Thanks for using Centreon. # # ----------------------- # # Contact : infos@centreon.com # # http://www.centreon.com # # # ###############################################################################
7.3 Installation en mode Web
http://ip du serveur centreon/centreon/
![install-centreon01](files/install-centreon01.png)
Démarrage de l'installation Web, cliquez sur "Next"
![install-centreon02](files/install-centreon02.png)
Validation des dépendances, cliquez sur "next".
![install-centreon03](files/install-centreon03.png)
Nous choisirons comme moteur de supervision nagios. Saisissez les chemins ci-dessous.
Nagios directory : /usr/local/nagios Nagiostats binary : /usr/local/nagios/bin/nagiostats Nagios image directory : /usr/local/nagios/share/images Embedded Perl initialisation file : /usr/local/nagios/bin/p1.pl
![install-centreon05](files/install-centreon05.png)
Nous choisirons comme broker ndoutils
Ndomod binary (ndomod.o) : /usr/local/nagios/bin/ndomod-3x.o
![install-centreon05](files/install-centreon07.png)
Création du user "Administrateur", admin et son mot de passe. Saisir une adresse valide pour l’email. Cliquez sur Next.
![install-centreon08](files/install-centreon08.png)
Définir les Accès MySQL, le mot de passe de MySQL. Laisser les noms de base par défaut CENTREON, CENTSTORAGE et CENTSTATUS. Saisir le mot de passe pour ces bases de données. Cliquez sur Next.
![install-centreon09](files/install-centreon09.png)
Cette fenêtre indique que vous devez modifier le fichier de configuration de MySql /etc/mysql/my.cnf. Ajoutez la ligne suivante.
innodb_file_per_table=1
Redémarrez le serveur MySql
sudo service mysql restart
![install-centreon10](files/install-centreon10.png)
Création des bases de données, cliquez sur Next.
![install-centreon11](files/install-centreon11.png)
Fin de l'installation, cliquez sur Finish
![Stacks Image 52384](files/stacks-image-12f05c8.png)
7.4 Configuration des services
sudo service centcore start sudo service centstorage start sudo service centreontrapd start
![Stacks Image 52444](files/stacks-image-f439916-800x392.png)
![Stacks Image 52465](files/stacks-image-e0138b1-800x198.png)
sudo service ndo2db start
![Stacks Image 52486](files/stacks-image-c6ee738.png)
![Stacks Image 52507](files/stacks-image-1f2f81b-800x288.png)