Configuration icinga

Fermé
RedOne - 27 juil. 2012 à 14:00
 RedOne - 27 juil. 2012 à 17:07
Bonjour tout le monde,

comme solution de supervision de parc informatique, j'ai opté pour icinga sous ubuntu.
après avoir installé cette solution, j'ai réussi à rajouter quelques hosts pour test.
le problème rencontré, est un peu bizarre car après le check automatique, icinga m'affiche les mêmes informations pour tous les hosts supervisés. ex :
===================================
Host : Host1

Service : C:\ Drive Space
Status : OK
Last Check : 07-27-2012 11:21:04
Duration : 0d 0h 57m 52s
Attempt : 1/3
Status Information : c: - total: 141,03 Gb - utilisé: 48,21 Gb (34%) - libre 92,82 Gb (66%)

Service : CPU Load
Status : OK
Last Check : 07-27-2012 11:22:52
Duration : 0d 0h 56m 4s
Attempt : 1/3
Status Information : Charge CPU 0% (5 moyenne minimale)

Service : Memory Usage
Status : OK
Last Check : 07-27-2012 11:24:40
Duration : 0d 0h 54m 16s
Attempt : 1/3
Status Information : Mémoire utilisée: total:2881,17 Mb - utilisée: 414,17 Mb (14%) - libre: 2467,00 Mb (86%)

Service : Uptime
Status : OK
Last Check : 07-27-2012 11:26:28
Duration : 0d 0h 52m 28s
Attempt : 1/3
Status Information : Système démarré - 1 jour(s) 20 heure(s) 51 minute(s)
__________________________________________________________________

Host : Host2

Service : C:\ Drive Space
Status : OK
Last Check : 07-27-2012 11:48:16
Duration : 0d 1h 11m 9s
Attempt : 1/3
Status Information : c: - total: 141,03 Gb - utilisé: 48,21 Gb (34%) - libre 92,82 Gb (66%)

Service : CPU Load
Status : OK
Last Check : 07-27-2012 11:41:17
Duration : 0d 1h 18m 8s
Attempt : 1/3
Status Information : Charge CPU 0% (5 moyenne minimale)

Service : Memory Usage
Status : OK
Last Check : 07-27-2012 11:43:05
Duration : 0d 1h 16m 20s
Attempt : 1/3
Status Information : Mémoire utilisée: total:2881,17 Mb - utilisée: 414,17 Mb (14%) - libre: 2467,00 Mb (86%)

Service : Uptime
Status : OK
Last Check : 07-27-2012 11:44:53
Duration : 0d 1h 14m 32s
Attempt : 1/3
Status Information : Système démarré - 1 jour(s) 20 heure(s) 51 minute(s)
===================================
remarque:
seules les 2 informations : Last check et Duration qui sont dynamiques et correctes, sinon les autres informations sont reste fausses et inchangées pour toutes les machines du parc.

je vous remercie d'avance pour votre aide.

1 réponse

phery Messages postés 9328 Date d'inscription lundi 13 septembre 2004 Statut Modérateur Dernière intervention 11 août 2020 372
Modifié par phery le 27/07/2012 à 14:05
Bonjour,

tes hosts sont-ils définis par IP ou par nom DNS ?

----------------phery--Laïque ze bôte-------------
"L'espérance est un orchestre symphonique pété de thunes" (mecmoins)
0
par IP. ex :
define host{
use windows-server;
host_name host1;
alias host1;
address 192.168.2.1;
}
define host{
use windows-server;
host_name host2;
alias host2;
address 192.168.2.2;
}
etc...
0
phery Messages postés 9328 Date d'inscription lundi 13 septembre 2004 Statut Modérateur Dernière intervention 11 août 2020 372
Modifié par phery le 27/07/2012 à 16:09
N'y a-t-il pas une erreur dans ton template "windows-serveur" (genre une IP qui redirigerait tous tes hotes vers la même machine) ?
0
tu veux dire le fichier windows.cfg dans le répertoire : /usr/local/icinga/etc/objects ? si oui, aucune redirection n'a été lieu.
0
phery Messages postés 9328 Date d'inscription lundi 13 septembre 2004 Statut Modérateur Dernière intervention 11 août 2020 372
27 juil. 2012 à 16:41
Personnellement j'utilise nagios. Mais ça se ressemble je pense.
Quand je lis ta définition d'hote je vois :
"use windows-server"
Cette ligne me semble-t-il fait référence à un template (un model prédefini d'hote).
Tu dois avoir un fichier genre "template.cfg" dans lequel tu as la définition du "windows-serveur".
0
exactement, ça se ressemble.
tu as raison, le fichier auquel "use windows-server" fait référence est le suivant : /usr/local/icinga/etc/objects/templates.cfg

voilà une partie du contenu :
# Windows host definition template - This is NOT a real host, just a template!

define host{
name windows-server ; The name of this host template
use generic-host ; Inherit default values from the generic-host template
check_period 24x7 ; By default, Windows servers are monitored round the clock
check_interval 5 ; Actively check the server every 5 minutes
retry_interval 1 ; Schedule host check retries at 1 minute intervals
max_check_attempts 10 ; Check each server 10 times (max)
check_command check-host-alive ; Default command to check if servers are "alive"
notification_period 24x7 ; Send notification out at any time - day or night
notification_interval 30 ; Resend notifications every 30 minutes
notification_options d,r ; Only send notifications for specific host states
contact_groups admins ; Notifications get sent to the admins by default
hostgroups windows-servers ; Host groups that Windows servers should be a member of
register 0 ; DONT REGISTER THIS - ITS JUST A TEMPLATE
}
0