Paramétrage de Shinken : Différence entre versions
De wikiGite
(→Ajouter un host et un service) |
|||
| Ligne 9 : | Ligne 9 : | ||
Thruk web interface URL : http://<@IP_serveur_Shinken>:3000 | Thruk web interface URL : http://<@IP_serveur_Shinken>:3000 | ||
| − | Après chaque modification du paramétrage, il est conseillé de tester la configuration | + | 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 check | ||
| + | /etc/init.d/shinken restart | ||
| + | |||
Pour vérifier les logs si le check est Failed : | Pour vérifier les logs si le check est Failed : | ||
cat /tmp/shinken_checkconfig_result | 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 | ||
| + | } | ||
Version du 20 mai 2011 à 14:26
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
}
