Paramétrage de Shinken : Différence entre versions
De wikiGite
m (a déplacé Shinken - Paramétrage vers Paramétrage de Shinken) |
|||
| Ligne 42 : | Ligne 42 : | ||
servicegroups LocalServices | servicegroups LocalServices | ||
} | } | ||
| + | |||
| + | == PNP4Nagios (Graph) == | ||
| + | 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 | ||
| + | wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.4.5.tar.gz | ||
| + | gzip -d rrdtool-1.2.23.tar.gz | ||
| + | tar -xvf | ||
| + | cd | ||
| + | ./configure --prefix=/data/rrd/src | ||
| + | make && make install | ||
| + | |||
| + | PHP GD : apt-get install php5-gd | ||
| + | Mod_rewrite : a2enmod rewrite | ||
| + | |||
| + | Téléchargement : | ||
| + | http://downloads.sourceforge.net/project/pnp4nagios/PNP-0.6/pnp4nagios-0.6.13.tar.gz | ||
| + | ./configure | ||
| + | make && make install | ||
| + | make fullinstall | ||
| + | |||
| + | Attention htpasswd | ||
| + | |||
| + | Renommer fichier | ||
| + | |||
| + | URL : http://localhost/pnp4nagios | ||
| + | |||
| + | activer dans shinken : http://shinken-monitoring.org/wiki/use_with_pnp | ||
Version du 7 juin 2011 à 10:02
Sommaire
Emplacement des principaux fichiers de configuration
Backup configuration file : /tmp/shinken-backup-20110513073545.tgz Configuration file folder : /etc/shinken Plugins Nagios : cd /usr/lib/nagios/plugins Thruk : /opt/thruk Log file : /var/lib/shinken/nagios.log Shinken startup script : /etc/init.d/shinken Thruk startup script : /etc/init.d/thruk Thruk web interface URL : http://<@IP_serveur_Shinken>:3000
Après chaque modification du paramétrage, il est conseillé de tester la configuration.
Il est également nécessaire de relancer les services Shinken:
/etc/init.d/shinken check /etc/init.d/shinken restart
Pour vérifier les logs si le check est Failed :
cat /tmp/shinken_checkconfig_result
Ajouter un hôte
- Créer un fichier <nom_hote>.cfg dans /etc/shinken/objects/host :
define host{
use linux-server
contact_groups admins
host_name atlanta
alias Atlanta France
address atlanta.dynalias.org
check_interval 1
parents router1
}
- Ajouter l'hôte dans un hostgroup (/etc/shinken/hostgroups.cfg)
Ajouter un service
- Créer un fichier .cfg (par exemple apache.cfg) dans /etc/shinken/objects/services :
# Simple web check
define service{
use local-service ; Name of service template to use
host_name localhost
service_description Http
check_command check_http
servicegroups LocalServices
}
PNP4Nagios (Graph)
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 wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.4.5.tar.gz gzip -d rrdtool-1.2.23.tar.gz tar -xvf cd ./configure --prefix=/data/rrd/src make && make install
PHP GD : apt-get install php5-gd Mod_rewrite : a2enmod rewrite
Téléchargement :
http://downloads.sourceforge.net/project/pnp4nagios/PNP-0.6/pnp4nagios-0.6.13.tar.gz ./configure make && make install make fullinstall
Attention htpasswd
Renommer fichier
URL : http://localhost/pnp4nagios
activer dans shinken : http://shinken-monitoring.org/wiki/use_with_pnp
