ppe n°1 installation de nagios/centreon - fnguyen.frfnguyen.fr/pdf/tuto/tuto_nagios.pdf · nguyen...

45
NGUYEN Frédéric BTS SIO PPE n°1 – Installation de Nagios/Centreon Introduction : Tout au long de ce tutorial nous allons voir comment installer Nagios et Centreon, commençons tout d’abord à les définir et voir leurs fonctions. Nagios : (anciennement appelé Netsaint) est une application permettant la surveillance système et réseau. Elle surveille les hôtes et services spécifiés, alertant lorsque les systèmes ont des dysfonctionnements et quand ils repassent en fonctionnement normal. Centreon : est un logiciel de surveillance et de supervision réseau, basé sur le moteur de récupération d'information libre Nagios et utilisant comme module l'outil NDOUtils. Nous allons travailler sur l’environnement Linux Debian 6, nous allons suivre toutes les étapes de son installation, pour ensuite installer Nagios et son plugin, puis installer NDO et NDO2DB et ainsi terminer sur l’installation de Centreon. Sommaire : I) Installation de Linux Debian 6 II) Installation de Nagios et de son plugin III) Installation de NDO + NDO2DB IV) Installation Centreon

Upload: duongdieu

Post on 10-Oct-2018

219 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: PPE n°1 Installation de Nagios/Centreon - fnguyen.frfnguyen.fr/pdf/tuto/Tuto_Nagios.pdf · NGUYEN Frédéric BTS SIO PPE n°1 – Installation de Nagios/Centreon Introduction : Tout

NGUYEN Frédéric BTS SIO

PPE n°1 – Installation de Nagios/Centreon

Introduction :

Tout au long de ce tutorial nous allons voir comment installer Nagios et Centreon, commençons

tout d’abord à les définir et voir leurs fonctions.

Nagios : (anciennement appelé Netsaint) est une application permettant la surveillance système et réseau. Elle surveille les hôtes et services spécifiés, alertant lorsque les systèmes ont des dysfonctionnements et quand ils repassent en fonctionnement normal. Centreon : est un logiciel de surveillance et de supervision réseau, basé sur le moteur de récupération d'information libre Nagios et utilisant comme module l'outil NDOUtils. Nous allons travailler sur l’environnement Linux Debian 6, nous allons suivre toutes les étapes de son installation, pour ensuite installer Nagios et son plugin, puis installer NDO et NDO2DB et ainsi terminer sur l’installation de Centreon.

Sommaire :

I) Installation de Linux Debian 6

II) Installation de Nagios et de son plugin

III) Installation de NDO + NDO2DB

IV) Installation Centreon

Page 2: PPE n°1 Installation de Nagios/Centreon - fnguyen.frfnguyen.fr/pdf/tuto/Tuto_Nagios.pdf · NGUYEN Frédéric BTS SIO PPE n°1 – Installation de Nagios/Centreon Introduction : Tout

NGUYEN Frédéric BTS SIO

PPE n°1 – Installation de Nagios/Centreon

I) Installation de Linux Debian 6

Dans cette partie nous utiliserons Workstation, un outil de virtualisation de système d'exploitation, pour installer Debian sur une machine virtuel. Dans le menu « File » on sélectionne « New Virtual Machine » pour créer une machine virtuel

On sélectionne Typical et on passe à l’étape suivante.

Page 3: PPE n°1 Installation de Nagios/Centreon - fnguyen.frfnguyen.fr/pdf/tuto/Tuto_Nagios.pdf · NGUYEN Frédéric BTS SIO PPE n°1 – Installation de Nagios/Centreon Introduction : Tout

NGUYEN Frédéric BTS SIO

PPE n°1 – Installation de Nagios/Centreon Ont choisir l’option de l’iso, où est contenue Debian 6 et on passe à l’étape suivante.

Dans cette étape ont choisis seulement le nom de la machine virtuel.

Page 4: PPE n°1 Installation de Nagios/Centreon - fnguyen.frfnguyen.fr/pdf/tuto/Tuto_Nagios.pdf · NGUYEN Frédéric BTS SIO PPE n°1 – Installation de Nagios/Centreon Introduction : Tout

NGUYEN Frédéric BTS SIO

PPE n°1 – Installation de Nagios/Centreon On laisse par défaut et on passe à l’étape suivante.

Puis on termine en cliquant sur « Finish »

Page 5: PPE n°1 Installation de Nagios/Centreon - fnguyen.frfnguyen.fr/pdf/tuto/Tuto_Nagios.pdf · NGUYEN Frédéric BTS SIO PPE n°1 – Installation de Nagios/Centreon Introduction : Tout

NGUYEN Frédéric BTS SIO

PPE n°1 – Installation de Nagios/Centreon C’est vraiment à partir de ce moment, qu’on va commencer à installer Debian.

On démarre la machine virtuelle et on sélectionne « Install ».

On choisit la langue désiré.

Page 6: PPE n°1 Installation de Nagios/Centreon - fnguyen.frfnguyen.fr/pdf/tuto/Tuto_Nagios.pdf · NGUYEN Frédéric BTS SIO PPE n°1 – Installation de Nagios/Centreon Introduction : Tout

NGUYEN Frédéric BTS SIO

PPE n°1 – Installation de Nagios/Centreon On choisit notre situation géographique.

En passant à l’étape suivant, on rencontre un problème de réseau.

Page 7: PPE n°1 Installation de Nagios/Centreon - fnguyen.frfnguyen.fr/pdf/tuto/Tuto_Nagios.pdf · NGUYEN Frédéric BTS SIO PPE n°1 – Installation de Nagios/Centreon Introduction : Tout

NGUYEN Frédéric BTS SIO

PPE n°1 – Installation de Nagios/Centreon Rien de très inquiétant on a seulement à branché notre carte réseau en « Bridged »

Pour cela « on clique-droit » et on sélectionne « Settings …»

Puis on sélectionne en « Bridged » et là on aura plus de problème de connexion réseau .

Page 8: PPE n°1 Installation de Nagios/Centreon - fnguyen.frfnguyen.fr/pdf/tuto/Tuto_Nagios.pdf · NGUYEN Frédéric BTS SIO PPE n°1 – Installation de Nagios/Centreon Introduction : Tout

NGUYEN Frédéric BTS SIO

PPE n°1 – Installation de Nagios/Centreon Pour le nom de la machine on met « nagios ».

Pour le domaine on met « lprs.local »

Page 9: PPE n°1 Installation de Nagios/Centreon - fnguyen.frfnguyen.fr/pdf/tuto/Tuto_Nagios.pdf · NGUYEN Frédéric BTS SIO PPE n°1 – Installation de Nagios/Centreon Introduction : Tout

NGUYEN Frédéric BTS SIO

PPE n°1 – Installation de Nagios/Centreon On va définir un mot de passe pour le compte super-utilisateur, donc le compte « root », ainsi son

mot de passe sera « admin »

Puis on reconfirme le mot de passe saisi précédemment

.

Page 10: PPE n°1 Installation de Nagios/Centreon - fnguyen.frfnguyen.fr/pdf/tuto/Tuto_Nagios.pdf · NGUYEN Frédéric BTS SIO PPE n°1 – Installation de Nagios/Centreon Introduction : Tout

NGUYEN Frédéric BTS SIO

PPE n°1 – Installation de Nagios/Centreon On créer maintenant un nouveau compte, dans ce cas le nom du compte sera « nguyen » et le mot

de passe « frederic ».

On saisit donc le nom du compte « nguyen » .

On définit le mot de passe « frederic ».

Page 11: PPE n°1 Installation de Nagios/Centreon - fnguyen.frfnguyen.fr/pdf/tuto/Tuto_Nagios.pdf · NGUYEN Frédéric BTS SIO PPE n°1 – Installation de Nagios/Centreon Introduction : Tout

NGUYEN Frédéric BTS SIO

PPE n°1 – Installation de Nagios/Centreon On re-tape le mot de passe « frederic »

On sélectionne « Assisté – utiliser un disque entier ».

Page 12: PPE n°1 Installation de Nagios/Centreon - fnguyen.frfnguyen.fr/pdf/tuto/Tuto_Nagios.pdf · NGUYEN Frédéric BTS SIO PPE n°1 – Installation de Nagios/Centreon Introduction : Tout

NGUYEN Frédéric BTS SIO

PPE n°1 – Installation de Nagios/Centreon On choisit le disque à partitionner.

On choisit tout dans une seule partition.

Page 13: PPE n°1 Installation de Nagios/Centreon - fnguyen.frfnguyen.fr/pdf/tuto/Tuto_Nagios.pdf · NGUYEN Frédéric BTS SIO PPE n°1 – Installation de Nagios/Centreon Introduction : Tout

NGUYEN Frédéric BTS SIO

PPE n°1 – Installation de Nagios/Centreon On sélectionne « Terminer le partitionnement et appliquer les changements ».

On sélectionne « Oui ».

Page 14: PPE n°1 Installation de Nagios/Centreon - fnguyen.frfnguyen.fr/pdf/tuto/Tuto_Nagios.pdf · NGUYEN Frédéric BTS SIO PPE n°1 – Installation de Nagios/Centreon Introduction : Tout

NGUYEN Frédéric BTS SIO

PPE n°1 – Installation de Nagios/Centreon On sélectionne « Non ».

On sélectionne « Oui » pour pouvoir utiliser le miroir du réseau

Page 15: PPE n°1 Installation de Nagios/Centreon - fnguyen.frfnguyen.fr/pdf/tuto/Tuto_Nagios.pdf · NGUYEN Frédéric BTS SIO PPE n°1 – Installation de Nagios/Centreon Introduction : Tout

NGUYEN Frédéric BTS SIO

PPE n°1 – Installation de Nagios/Centreon On choisit « France ».

On choisit le premier miroir.

Page 16: PPE n°1 Installation de Nagios/Centreon - fnguyen.frfnguyen.fr/pdf/tuto/Tuto_Nagios.pdf · NGUYEN Frédéric BTS SIO PPE n°1 – Installation de Nagios/Centreon Introduction : Tout

NGUYEN Frédéric BTS SIO

PPE n°1 – Installation de Nagios/Centreon On laisse vide et on passe à l’étape suivante en sélectionnant « Continuer »

On sélectionne « Non ».

Page 17: PPE n°1 Installation de Nagios/Centreon - fnguyen.frfnguyen.fr/pdf/tuto/Tuto_Nagios.pdf · NGUYEN Frédéric BTS SIO PPE n°1 – Installation de Nagios/Centreon Introduction : Tout

NGUYEN Frédéric BTS SIO

PPE n°1 – Installation de Nagios/Centreon Ont sélectionne les logicils à installer et on passe à l’étape suivant en sélectionnant « Continuer »

On met pour le nom de domaine « lprs.local »

Page 18: PPE n°1 Installation de Nagios/Centreon - fnguyen.frfnguyen.fr/pdf/tuto/Tuto_Nagios.pdf · NGUYEN Frédéric BTS SIO PPE n°1 – Installation de Nagios/Centreon Introduction : Tout

NGUYEN Frédéric BTS SIO

PPE n°1 – Installation de Nagios/Centreon On installe le programme de démarrage GRUB sur le secteur d’amorçage en sélectionnant « Oui ».

On termine l’installation en sélectionnant « Continuer ».

L’installation de Debian 6 est maintenant terminer.

Page 19: PPE n°1 Installation de Nagios/Centreon - fnguyen.frfnguyen.fr/pdf/tuto/Tuto_Nagios.pdf · NGUYEN Frédéric BTS SIO PPE n°1 – Installation de Nagios/Centreon Introduction : Tout

NGUYEN Frédéric BTS SIO

PPE n°1 – Installation de Nagios/Centreon

II) Installation de Nagios et de son plugin

Dans cette partie nous allons d’abord commencé par installer Nagios et puis ensuite le plugin

NDOutils.

On démarre notre machine virtuelle et on se connecte en « root » avec le mot de passe « admin »

Pour les prérequis : On commence par faire un

« apt-get install sudo mailx lsb-release postfix »

Page 20: PPE n°1 Installation de Nagios/Centreon - fnguyen.frfnguyen.fr/pdf/tuto/Tuto_Nagios.pdf · NGUYEN Frédéric BTS SIO PPE n°1 – Installation de Nagios/Centreon Introduction : Tout

NGUYEN Frédéric BTS SIO

PPE n°1 – Installation de Nagios/Centreon et « apt-get install build-essential »

On va ensuite créer un serveur Web (Apache) « apt-get install apache2 apache2-mpm-prefork »

Page 21: PPE n°1 Installation de Nagios/Centreon - fnguyen.frfnguyen.fr/pdf/tuto/Tuto_Nagios.pdf · NGUYEN Frédéric BTS SIO PPE n°1 – Installation de Nagios/Centreon Introduction : Tout

NGUYEN Frédéric BTS SIO

PPE n°1 – Installation de Nagios/Centreon

Ensuite on installe PHP “ apt-get install php5 php5-mysql “

Et apt-get install php-pear php5-ldap php5-snmp php5-gd

Page 22: PPE n°1 Installation de Nagios/Centreon - fnguyen.frfnguyen.fr/pdf/tuto/Tuto_Nagios.pdf · NGUYEN Frédéric BTS SIO PPE n°1 – Installation de Nagios/Centreon Introduction : Tout

NGUYEN Frédéric BTS SIO

PPE n°1 – Installation de Nagios/Centreon On installe MySQL apt-get install mysql-server-5.0 libmysqlclient15-dev et on choisit comme mot de

passe « admin »

On re-tape le mot de passe « admin »

Page 23: PPE n°1 Installation de Nagios/Centreon - fnguyen.frfnguyen.fr/pdf/tuto/Tuto_Nagios.pdf · NGUYEN Frédéric BTS SIO PPE n°1 – Installation de Nagios/Centreon Introduction : Tout

NGUYEN Frédéric BTS SIO

PPE n°1 – Installation de Nagios/Centreon On installe RRDTool apt-get install rrdtool librrds-perl

On installe Perl apt-get install libconfig-inifiles-perl libcrypt-des-perl libdigest-hmac-perl libdigest-

sha1-perl libgd-gd2-perl

Page 24: PPE n°1 Installation de Nagios/Centreon - fnguyen.frfnguyen.fr/pdf/tuto/Tuto_Nagios.pdf · NGUYEN Frédéric BTS SIO PPE n°1 – Installation de Nagios/Centreon Introduction : Tout

NGUYEN Frédéric BTS SIO

PPE n°1 – Installation de Nagios/Centreon

On installe SNMP apt-get install snmp snmpd libnet-snmp-perl libsnmp-perl

On installe les librairies GD apt-get install libgd2-xpm libgd2-xpm-dev libpng12-dev

Page 25: PPE n°1 Installation de Nagios/Centreon - fnguyen.frfnguyen.fr/pdf/tuto/Tuto_Nagios.pdf · NGUYEN Frédéric BTS SIO PPE n°1 – Installation de Nagios/Centreon Introduction : Tout

NGUYEN Frédéric BTS SIO

PPE n°1 – Installation de Nagios/Centreon Puis on installe le serveur SSH, si ce n’est pas encore déjà fait. apt-get install openssh-server IMAGE

On va maintenant créer le compte et ajouter les droits.

On créer d’abord le login « nagios » /usr/sbin/useradd -m nagios

Page 26: PPE n°1 Installation de Nagios/Centreon - fnguyen.frfnguyen.fr/pdf/tuto/Tuto_Nagios.pdf · NGUYEN Frédéric BTS SIO PPE n°1 – Installation de Nagios/Centreon Introduction : Tout

NGUYEN Frédéric BTS SIO

PPE n°1 – Installation de Nagios/Centreon On défini un mot de passe qui sera « nagios » et normalement le mot de passe aura était mise à jour.

On créer le groupe « nagcmd » /usr/sbin/groupadd nagcmd

on donne les droits : /usr/sbin/usermod -G nagios,nagcmd nagios

/usr/sbin/usermod -G nagios,nagcmd www-data

Page 27: PPE n°1 Installation de Nagios/Centreon - fnguyen.frfnguyen.fr/pdf/tuto/Tuto_Nagios.pdf · NGUYEN Frédéric BTS SIO PPE n°1 – Installation de Nagios/Centreon Introduction : Tout

NGUYEN Frédéric BTS SIO

PPE n°1 – Installation de Nagios/Centreon On va commencer à installer Nagios, pour cela on va dans le répertoire de nagios

cd /home/nagios/

Puis on créer un répertoire download et on se place vous dans ce répertoire:

mkdir download

cd download

On télécharge nagios-3.3.1.tar.gz et on le transfère avec WinSCP

WinSCP est un client SFTP graphique pour Windows. Il utilise SSH et est open source. Le

protocole SCP est également supporté. Le but de ce programme est de permettre la copie sécurisée

de fichiers entre un ordinateur local et un ordinateur distant.

On fait ifconfig pour voir notre adresse IP, puis on remplit les différents champs comme dans l’image.

Page 28: PPE n°1 Installation de Nagios/Centreon - fnguyen.frfnguyen.fr/pdf/tuto/Tuto_Nagios.pdf · NGUYEN Frédéric BTS SIO PPE n°1 – Installation de Nagios/Centreon Introduction : Tout

NGUYEN Frédéric BTS SIO

PPE n°1 – Installation de Nagios/Centreon

Puis on décompresse l’archive de nagios gunzip nagios-3.3.1.tar.gz

Page 29: PPE n°1 Installation de Nagios/Centreon - fnguyen.frfnguyen.fr/pdf/tuto/Tuto_Nagios.pdf · NGUYEN Frédéric BTS SIO PPE n°1 – Installation de Nagios/Centreon Introduction : Tout

NGUYEN Frédéric BTS SIO

PPE n°1 – Installation de Nagios/Centreon tar xvzf nagios-3.3.1.tar.gz

Une fois décompressé, nous allons installer le programme: cd nagios/

./configure --prefix=/usr/local/nagios --with-command-group=nagcmd --enable-nanosleep --enable-event-broker

Page 30: PPE n°1 Installation de Nagios/Centreon - fnguyen.frfnguyen.fr/pdf/tuto/Tuto_Nagios.pdf · NGUYEN Frédéric BTS SIO PPE n°1 – Installation de Nagios/Centreon Introduction : Tout

NGUYEN Frédéric BTS SIO

PPE n°1 – Installation de Nagios/Centreon make all

make install

Page 31: PPE n°1 Installation de Nagios/Centreon - fnguyen.frfnguyen.fr/pdf/tuto/Tuto_Nagios.pdf · NGUYEN Frédéric BTS SIO PPE n°1 – Installation de Nagios/Centreon Introduction : Tout

NGUYEN Frédéric BTS SIO

PPE n°1 – Installation de Nagios/Centreon make install-init

make install-commandmode

Page 32: PPE n°1 Installation de Nagios/Centreon - fnguyen.frfnguyen.fr/pdf/tuto/Tuto_Nagios.pdf · NGUYEN Frédéric BTS SIO PPE n°1 – Installation de Nagios/Centreon Introduction : Tout

NGUYEN Frédéric BTS SIO

PPE n°1 – Installation de Nagios/Centreon make install-config

On à finis d’installer Nagios, on va maintenent installer son plugin.

On fait ifconfig pour voir notre adresse IP, puis on remplit les différents champs comme dans l’image.

Page 33: PPE n°1 Installation de Nagios/Centreon - fnguyen.frfnguyen.fr/pdf/tuto/Tuto_Nagios.pdf · NGUYEN Frédéric BTS SIO PPE n°1 – Installation de Nagios/Centreon Introduction : Tout

NGUYEN Frédéric BTS SIO

PPE n°1 – Installation de Nagios/Centreon On télécharge nagios-plugins-1.4.14.tar.gz et on le transfère avec WinSCP vers la machine virtuelle.

On décompresse l’archive tar xvzf nagios-plugins-1.4.14.tar.gz

Page 34: PPE n°1 Installation de Nagios/Centreon - fnguyen.frfnguyen.fr/pdf/tuto/Tuto_Nagios.pdf · NGUYEN Frédéric BTS SIO PPE n°1 – Installation de Nagios/Centreon Introduction : Tout

NGUYEN Frédéric BTS SIO

PPE n°1 – Installation de Nagios/Centreon Une fois décompressé, nous allons installer le programme: cd nagios-plugins-1.4.14/

./configure --with-nagios-user=nagios --with-nagios-group=nagios --with-openssl=/usr/bin/openssl

make all

Page 35: PPE n°1 Installation de Nagios/Centreon - fnguyen.frfnguyen.fr/pdf/tuto/Tuto_Nagios.pdf · NGUYEN Frédéric BTS SIO PPE n°1 – Installation de Nagios/Centreon Introduction : Tout

NGUYEN Frédéric BTS SIO

PPE n°1 – Installation de Nagios/Centreon make install

On à maintenant finis d’installer Nagios et le plugin.

Configurons maintenant l’accès Web de Nagios, en créant le htaccess.

htpasswd -c /usr/local/nagios/etc/htpasswd.users nagios

On choisit comme mot de passe « nagios »

Page 36: PPE n°1 Installation de Nagios/Centreon - fnguyen.frfnguyen.fr/pdf/tuto/Tuto_Nagios.pdf · NGUYEN Frédéric BTS SIO PPE n°1 – Installation de Nagios/Centreon Introduction : Tout

NGUYEN Frédéric BTS SIO

PPE n°1 – Installation de Nagios/Centreon Depuis notre ordinateur, on ouvre bloc note et on copie le code ci-dessous et on enregistre sous le

nom « httpd.conf »

ScriptAlias /nagios/cgi-bin /usr/local/nagios/sbin <Directory "/usr/local/nagios/sbin"> Options ExecCGI AllowOverride None Order allow,deny Allow from all AuthName "Nagios Access" AuthType Basic AuthUserFile /usr/local/nagios/etc/htpasswd.users Require valid-user </Directory> Alias /nagios /usr/local/nagios/share <Directory "/usr/local/nagios/share"> Options None AllowOverride None Order allow,deny Allow from all AuthName "Nagios Access" AuthType Basic AuthUserFile /usr/local/nagios/etc/htpasswd.users Require valid-user </Directory>

Puis on transfère depuis WinSCP dans /etc/apache2

Page 37: PPE n°1 Installation de Nagios/Centreon - fnguyen.frfnguyen.fr/pdf/tuto/Tuto_Nagios.pdf · NGUYEN Frédéric BTS SIO PPE n°1 – Installation de Nagios/Centreon Introduction : Tout

NGUYEN Frédéric BTS SIO

PPE n°1 – Installation de Nagios/Centreon Puis on redémarre le serveur apache

service apache2 restart

On fait un ifconfig pour savoir notre adresse IP

Page 38: PPE n°1 Installation de Nagios/Centreon - fnguyen.frfnguyen.fr/pdf/tuto/Tuto_Nagios.pdf · NGUYEN Frédéric BTS SIO PPE n°1 – Installation de Nagios/Centreon Introduction : Tout

NGUYEN Frédéric BTS SIO

PPE n°1 – Installation de Nagios/Centreon On créer un login et un password pour nagios, le nom du compte est « nguyen » et le mot de passe

est « frederic »

htpasswd /usr/local/nagios/etc/htpasswd.users nguyen

Mettons notre http://IP_DU_SERVER/nagios et connectons avec le compte précédemment créé.

Le poller nagios se parametrer ainsi :

chown -R nagios:nagios /usr/local/nagios

chmod -R 775 /usr/local/nagios

chown -R nagios:www-data /usr/local/nagios/etc

chmod -R 775 /usr/local/nagios/etc

chown -R nagios:www-data /usr/local/nagios/share

chmod -R 775 /usr/local/nagios/share

Page 39: PPE n°1 Installation de Nagios/Centreon - fnguyen.frfnguyen.fr/pdf/tuto/Tuto_Nagios.pdf · NGUYEN Frédéric BTS SIO PPE n°1 – Installation de Nagios/Centreon Introduction : Tout

NGUYEN Frédéric BTS SIO

PPE n°1 – Installation de Nagios/Centreon

III) Installation de NDO + NDO2DB

NDO permet a nagios de faire parvenir les info a centreon et Ndo2db permet a centreon de

récupérer les info envoyé par NDO

On télécharge ndoutils-1.4b9.tar.gz et on le transfère avec WinSCP

On décompresse l’archive tar xvzf ndoutils-1.4b9.tar.gz

Page 40: PPE n°1 Installation de Nagios/Centreon - fnguyen.frfnguyen.fr/pdf/tuto/Tuto_Nagios.pdf · NGUYEN Frédéric BTS SIO PPE n°1 – Installation de Nagios/Centreon Introduction : Tout

NGUYEN Frédéric BTS SIO

PPE n°1 – Installation de Nagios/Centreon Une fois décompressé, nous allons installer le programme:

cd nagios-plugins-1.4.14/

./configure --prefix=/usr/local/nagios/ --enable-mysql --disable-pgsql \

--with-ndo2db-user=nagios --with-ndo2db-group=nagios

make

make

Page 41: PPE n°1 Installation de Nagios/Centreon - fnguyen.frfnguyen.fr/pdf/tuto/Tuto_Nagios.pdf · NGUYEN Frédéric BTS SIO PPE n°1 – Installation de Nagios/Centreon Introduction : Tout

NGUYEN Frédéric BTS SIO

PPE n°1 – Installation de Nagios/Centreon sudo cp ./src/ndomod-3x.o /usr/local/nagios/bin/ndomod.o sudo cp ./src/ndo2db-3x /usr/local/nagios/bin/ndo2db 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 775 /usr/local/nagios/bin/ndo* sudo chown nagios:nagios /usr/local/nagios/bin/ndo*

Créer ensuite un deamon ndo2db:

sudo pico /etc/init.d/ndo2db

Page 42: PPE n°1 Installation de Nagios/Centreon - fnguyen.frfnguyen.fr/pdf/tuto/Tuto_Nagios.pdf · NGUYEN Frédéric BTS SIO PPE n°1 – Installation de Nagios/Centreon Introduction : Tout

NGUYEN Frédéric BTS SIO

PPE n°1 – Installation de Nagios/Centreon On se connecte à WinSCP, on va dans /etc/init.d pour transféré le fichier « ndo2db » dans l’ordinateur

Depuis notre ordinateur, on édite le fichier « ndo2db » et on copie le code ci-dessous et on

enregistre.

Page 43: PPE n°1 Installation de Nagios/Centreon - fnguyen.frfnguyen.fr/pdf/tuto/Tuto_Nagios.pdf · NGUYEN Frédéric BTS SIO PPE n°1 – Installation de Nagios/Centreon Introduction : Tout

NGUYEN Frédéric BTS SIO

PPE n°1 – Installation de Nagios/Centreon Puis avec WinSCP, on re-transfère dans le sens inverse.

On à maintenant finis d’installer NDO + NDO2DB

IV) Installation Centreon

Dans cette partie, nous allons installer Centreon.

On télécharge centreon-2.2.2.tar.gz et on le transfère avec WinSCP vers la machine virtuelle.

Page 44: PPE n°1 Installation de Nagios/Centreon - fnguyen.frfnguyen.fr/pdf/tuto/Tuto_Nagios.pdf · NGUYEN Frédéric BTS SIO PPE n°1 – Installation de Nagios/Centreon Introduction : Tout

NGUYEN Frédéric BTS SIO

PPE n°1 – Installation de Nagios/Centreon On décompresse l’archive tar xvzf centreon-2.2.2.tar.gz

Une fois décompressé, nous allons installer le programme: cd centreon-2.2.2.tar.gz/

On lance l’installation de Centreon

sudo ./install.sh –i

Descendez tout en bas du contrat de licence puis accepté en cliquant "Y".

Répondez "Y" à toutes les questions posées lors du process d’installation :

Et valider les chemins par défaut lors de l’installation.

Arriver au moment où il vous est proposé:

Where is your NDO ndomod binary ?

default to [/usr/sbin/ndomod.o]

>

Entrer le chemin du fichier que nous avons utilisé lors de l’installation NDO:

Where is your NDO ndomod binary ?

default to [/usr/sbin/ndomod.o]

> /usr/local/nagios/bin/ndomod.o

Puis continuer en acceptant les chemins par défaut et en mettant "Y" à chaques questions.

Lorsque l’installer vous demande de mettre à jour les librairies PEAR, taper "Y" et valider.

Ceci va lancer les mises à jour des modules pear

Continuer en validant les chemins par défaut et en mettant "Y" à chaques questions.

Page 45: PPE n°1 Installation de Nagios/Centreon - fnguyen.frfnguyen.fr/pdf/tuto/Tuto_Nagios.pdf · NGUYEN Frédéric BTS SIO PPE n°1 – Installation de Nagios/Centreon Introduction : Tout

NGUYEN Frédéric BTS SIO

PPE n°1 – Installation de Nagios/Centreon

Voilà Centreon est installé.

Il ne rester plus qu’à faire un reload du serveur apache.

sudo service apache2 reload

Le tutorial est maintenant finis.