Outils personnels

Installation de PNP4Nagios : Différence entre versions

De wikiGite

(Paramétrage)
(Paramétrage)
Ligne 22 : Ligne 22 :
 
  htpasswd -c /usr/local/pnp4nagios/htpasswd.users admin
 
  htpasswd -c /usr/local/pnp4nagios/htpasswd.users admin
  
*Ajouter les lignes suivantes dans /etc/shinken/nagios.cfg (on active le "BULK" mode plutôt que le mode synchrone http://docs.pnp4nagios.org/pnp-0.6/config):
+
<!-- *Ajouter les lignes suivantes dans /etc/shinken/nagios.cfg (on active le "BULK" mode plutôt que le mode synchrone http://docs.pnp4nagios.org/pnp-0.6/config):
 
  process_performance_data=1
 
  process_performance_data=1
 
  #
 
  #
Ligne 39 : Ligne 39 :
 
  host_perfdata_file_mode=a
 
  host_perfdata_file_mode=a
 
  host_perfdata_file_processing_interval=15
 
  host_perfdata_file_processing_interval=15
  host_perfdata_file_processing_command=process-host-perfdata-file
+
  host_perfdata_file_processing_command=process-host-perfdata-file -->
  
 
* Démarrer le service NPCD
 
* Démarrer le service NPCD

Version du 6 juin 2012 à 09:38

PNP is an addon to nagios which analyzes performance data provided by plugins and stores them automatically into RRD-databases.

Pré-Requis

apt-get install rrdtool
apt-get install librrds-perl
apt-get install zlib1g zlib1g-dev libpng12-0 libpng12-dev libfreetype6 libfreetype6-dev libart-2.0-2 libart-2.0-dev librrd-dev
apt-get install php5-gd
a2enmod rewrite

Téléchargement et compilation de PNP4Nagios

wget http://downloads.sourceforge.net/project/pnp4nagios/PNP-0.6/pnp4nagios-0.6.17.tar.gz
tar -xvzf pnp4nagios-*.tar.gz
cd pnp4nagios-*
./configure --with-nagios-user=shinken --with-nagios-group=shinken 
make all
make install
make fullinstall

L'installation paramètre Apache en ajoutant un fichier /etc/apache2/conf.d/pnp4nagios.conf, puis relance le serveur web.

Paramétrage

Vérifier l'emplacement du fichier htpasswd (dans/etc/apache2/conf.d/pnp4nagios.conf, ligne AuthUserFile). Si le chemin est bon (attention notamment à remplacer "nagios" par "pnp4nagios"), créer ce fichier (ou pointer vers un fichier existant, par exemple celui de" Shinken /etc/shinken/htpasswd.users)

htpasswd -c /usr/local/pnp4nagios/htpasswd.users admin


  • Démarrer le service NPCD
/etc/init.d/npcd start
  • Se connecter à : http://localhost/pnp4nagios
  • Si tout est correct (en vert), renommer ou supprimer le fichier /usr/local/pnp4nagios/share/install.php

Accès à l'interface Web

http://<@IP-serveur>/pnp4nagios

Plus d'informations sur Shinken & PNP : http://shinken-monitoring.org/wiki/use_with_pnp