Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
1219 connectés 

  FORUM HardWare.fr
  Linux et OS Alternatifs
  réseaux et sécurité

  [Nagios]Problème de configuration check_nt [RESOLU]

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

[Nagios]Problème de configuration check_nt [RESOLU]

n°1316356
Slayer_hc
Posté le 18-07-2012 à 10:58:06  profilanswer
 

Bonjour à tous,
 
Petite explication de mon soucis : j'ai installé Nagios sur une Debian Squeeze, via VMWare installé sur un 2K8 Serveur, le but étant de superviser l'ensemble de nos serveurs, plus, les serveurs clients plus tard.
 
Je suis actuellement confronté a un petit soucis au niveau de la configuration de Nagios, en effet, jusqu’à hier j'avais un soucis avec le monitoring de mon serveur 2K8 et le message d'erreur "NSC : Invalid Password". Après moultes recherches sur le net j'ai fini par définir un mot de passe a l'installation du client NSC++ sur mon serveur, en occurrence le même que l'utilisateur "nagios" histoire d'être tranquille.
 
Le problème ne voulant pas se résoudre, j'ai essayé de mettre le mot de passe en dur dans les commandes de Nagios, via le fichier command.cfg, tout en vérifiant que tout était bon dans le fichier de configuration de Nagios via la commande /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg et ensuite un invoke-rc.d nagios restart.
 
Ce matin, surprise j'ai un nouveau soucis :pt1cable: , ou cette fois, lorsque je vérifie la conformité du fichier de configuration de Nagios, j'obtiens ça :
 
http://hfr-rehost.net/preview/self/pic/d84108202e427b4dd204fa6935961766a6fc52fb.jpeg
 
Nagios est configuré de la façon suivante :
 
J'ai créé un dossier "serveur_windows" dans lequel j'ai mis les fichier de conf pour le group de mes serveurs Windows et chaque .cfg de ces mêmes serveurs.
 
http://hfr-rehost.net/preview/self/pic/94e3db586616838334657a43143963cdecc0c4fb.jpeg
 
Voici ce qu'il y a dans le fichier .cfg de mon serveur :
 
http://hfr-rehost.net/preview/self/pic/d3c4e1a5ad7459e9e0e5893f058eec9d10111ec8.jpeg
 
Le mot de passe est bien mit en dur dans le fichier nsc.ini du serveur, ainsi que le "allowed host= xx.xx.xx.xx", j'ai bien modifié le service nsc sur le serveur pour qu'il accède au bureau, par contre je n'ai pas l'icône dans le systray  :(
 
J'ai regardé les acl et j'ai bien nagios en lecture sur le répertoire /usr/local/nagios.*
 
Voila mon petit soucis...
Si jamais vous aviez une idée pour m'aider à m'en sortir je suis preneur, je commence à devenir un peu fou avec tout ça :D
 
Merci d'avance et merci d'avoir pris le temps de me lire.
 
Edit : j'ai un peu avancé sur le sujet, à priori il faut créer un fichier services.cfg et l'intégrer dans le nagios.cfg.
 
du coup j'ai créé un fichier comme celui-ci :
 
http://hfr-rehost.net/preview/self/pic/7b97c469867a9def60d41aa6d31e99137b06279b.jpeg
 
Mais ça ne fonctionne toujours pas :sweat:


Message édité par Slayer_hc le 31-07-2012 à 17:18:15
mood
Publicité
Posté le 18-07-2012 à 10:58:06  profilanswer
 

n°1316470
roscocoltr​an
L'enfer c'est les utilisateurs
Posté le 20-07-2012 à 01:28:11  profilanswer
 

mais la commande check_nt est où ?


---------------
"Your god is too small", Giordano Bruno, 1548 - 1600
n°1316487
Slayer_hc
Posté le 20-07-2012 à 12:00:19  profilanswer
 

Si je ne me trompe pas, la commande check_nt doit se trouver dans le fichier services.cfg en fait.  
 
Le fichier serveur.cfg regroupe les différents services et options pour le monitoring propre à ce serveur, check_nt doit ensuite être exécuté en fonction de la commande pré-définie dans le fichier services.cfg (qui est aussi pris en compte dans le fichier nagios.cfg).
 
J'ai essayé de définir cette dite commande, mais j'ai toujours le même message d'erreur dans les logs :sweat:
 
Du moins, c'est ce qu'il ma semblé comprendre quand au fonctionnement de Nagios, maintenant je ne suis pas encore un expert, j'ai peut-être raté quelque chose :)

n°1316561
roscocoltr​an
L'enfer c'est les utilisateurs
Posté le 20-07-2012 à 18:47:26  profilanswer
 

Slayer_hc a écrit :

Si je ne me trompe pas, la commande check_nt doit se trouver dans le fichier services.cfg en fait.  
 
Le fichier serveur.cfg regroupe les différents services et options pour le monitoring propre à ce serveur, check_nt doit ensuite être exécuté en fonction de la commande pré-définie dans le fichier services.cfg (qui est aussi pris en compte dans le fichier nagios.cfg).
 
J'ai essayé de définir cette dite commande, mais j'ai toujours le même message d'erreur dans les logs :sweat:
 
Du moins, c'est ce qu'il ma semblé comprendre quand au fonctionnement de Nagios, maintenant je ne suis pas encore un expert, j'ai peut-être raté quelque chose :)


il faut vérifier et trouver la déclaration de la commande check_nt, avec un grep par exemple.


---------------
"Your god is too small", Giordano Bruno, 1548 - 1600
n°1316604
Slayer_hc
Posté le 21-07-2012 à 12:52:02  profilanswer
 

Ok, merci :)
 
Je vais essayer de voir ça ce weekend.

n°1317034
Slayer_hc
Posté le 27-07-2012 à 18:29:05  profilanswer
 

Voila, j'ai fais un petit grep avec check_nt en paramètre, voici le resultat :
 

Spoiler :

/usr/local/nagios/etc/objects/windows.cfg: check_command  check_nt!CLIENTVERSION
/usr/local/nagios/etc/objects/windows.cfg: check_command  check_nt!UPTIME
/usr/local/nagios/etc/objects/windows.cfg: check_command  check_nt!CPULOAD!-l 5,80,90
/usr/local/nagios/etc/objects/windows.cfg: check_command  check_nt!MEMUSE!-w 80 -c 90
/usr/local/nagios/etc/objects/windows.cfg: check_command  check_nt!USEDDISKSPACE!-l c -w 80 -c 90
/usr/local/nagios/etc/objects/windows.cfg: check_command  check_nt!SERVICESTATE!-d SHOWALL -l W3SVC
/usr/local/nagios/etc/objects/windows.cfg: check_command  check_nt!PROCSTATE!-d SHOWALL -l Explorer.exe
/usr/local/nagios/etc/objects/services.cfg:#check_command check_nt!USEDDISKSPACE!-l c -w 80 -c 90
/usr/local/nagios/etc/objects/services.cfg: check_command check_nt! -H $HOSTADDRESS$ -p 16489 -s nagios -l $ARG1$ -w $ARG2$ -c $ARG3$
/usr/local/nagios/etc/serveur_windows/jesse.cfg: check_command  check_nt!CLIENTVERSION
/usr/local/nagios/etc/serveur_windows/jesse.cfg: check_command  check_nt!UPTIME
/usr/local/nagios/etc/serveur_windows/jesse.cfg: check_command  check_nt!CPULOAD!-l 5,80,90
/usr/local/nagios/etc/serveur_windows/jesse.cfg: check_command  check_nt!MEMUSE!-w 80 -c 90
/usr/local/nagios/etc/serveur_windows/jesse.cfg: check_command  check_nt!USEDDISKSPACE!-l c -w 80 -c 90
/usr/local/nagios/etc/serveur_windows/jesse.cfg: check_command  check_nt!SERVICESTATE!-d SHOWALL -l W3SVC
/usr/local/nagios/etc/serveur_windows/jesse.cfg: check_command  check_nt!PROCSTATE!-d SHOWALL -l Explorer.exe
/usr/local/nagios/etc/serveur_windows/services.cfg: #check_command check_nt!USEDDISKSPACE!-l c -w 80 -c 90
Fichier binaire /usr/local/nagios/libexec/check_ntp concordant
Fichier binaire /usr/local/nagios/libexec/check_ntp_peer concordant
Fichier binaire /usr/local/nagios/libexec/check_ntp_time concordant
Fichier binaire /usr/local/nagios/libexec/check_nt concordant
/usr/local/nagios/share/docs/monitoring-windows.html:For this example, we will be installing the <a href="http://sourceforge.net/projects/nscplus">NSClient++</a> addon on the Windows machine and using the <i>check_nt</i> plugin to communicate with the NSClient++ addon.  The <i>check_nt</i> plugin should already be installed on the Nagios server if you followed the quickstart guide.  
/usr/local/nagios/share/docs/monitoring-windows.html:<li>A <i>check_nt</i> command definition has been added to the <i>commands.cfg</i> file.  This allows you to use the <i>check_nt</i> plugin to monitor Window services.</li>
/usr/local/nagios/share/docs/monitoring-windows.html: check_command  check_nt!CLIENTVERSION
/usr/local/nagios/share/docs/monitoring-windows.html: check_command  check_nt!UPTIME
/usr/local/nagios/share/docs/monitoring-windows.html: check_command  check_nt!CPULOAD!-l 5,80,90
/usr/local/nagios/share/docs/monitoring-windows.html: check_command  check_nt!MEMUSE!-w 80 -c 90
/usr/local/nagios/share/docs/monitoring-windows.html: check_command  check_nt!USEDDISKSPACE!-l c -w 80 -c 90
/usr/local/nagios/share/docs/monitoring-windows.html: check_command  check_nt!SERVICESTATE!-d SHOWALL -l W3SVC
/usr/local/nagios/share/docs/monitoring-windows.html: check_command  check_nt!PROCSTATE!-d SHOWALL -l Explorer.exe
/usr/local/nagios/share/docs/monitoring-windows.html:If you specified a password in the NSClient++ configuration file on the Windows machine, you'll need to modify the <i>check_nt</i> command definition to include the password.  Open the <i>commands.cfg</i> file for editing.
/usr/local/nagios/share/docs/monitoring-windows.html:Change the definition of the <i>check_nt</i> command to include the "-s &lt;PASSWORD&gt;" argument (where PASSWORD is the password you specified on the Windows machine) like this:
/usr/local/nagios/share/docs/monitoring-windows.html: command_name check_nt
/usr/local/nagios/share/docs/monitoring-windows.html: command_line $USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -s PASSWORD -v $ARG1$ $ARG2$
Fichier binaire /usr/local/nagios/share/locale/fr/LC_MESSAGES/nagios-plugins.mo concordant
/usr/local/nagios/var/retention.dat:check_command=check_nt!USEDDISKSPACE!-l c -w 80 -c 90
/usr/local/nagios/var/retention.dat:check_command=check_nt!CPULOAD!-l 5,80,90 -s nagios
/usr/local/nagios/var/retention.dat:check_command=check_nt!PROCSTATE!-d SHOWALL -l Explorer.exe
/usr/local/nagios/var/retention.dat:check_command=check_nt!MEMUSE!-w 80 -c 90
/usr/local/nagios/var/retention.dat:check_command=check_nt!CLIENTVERSION
/usr/local/nagios/var/retention.dat:check_command=check_nt!UPTIME
/usr/local/nagios/var/retention.dat:check_command=check_nt!SERVICESTATE!-d SHOWALL -l W3SVC
/usr/local/nagios/var/objects.cache: command_name check_nt
/usr/local/nagios/var/objects.cache: command_line $USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -s nagios -v $ARG1$ $ARG2$
/usr/local/nagios/var/objects.cache: check_command check_nt!USEDDISKSPACE!-l c -w 80 -c 90
/usr/local/nagios/var/objects.cache: check_command check_nt!CPULOAD!-l 5,80,90 -s nagios
/usr/local/nagios/var/objects.cache: check_command check_nt!PROCSTATE!-d SHOWALL -l Explorer.exe
/usr/local/nagios/var/objects.cache: check_command check_nt!MEMUSE!-w 80 -c 90
/usr/local/nagios/var/objects.cache: check_command check_nt!CLIENTVERSION
/usr/local/nagios/var/objects.cache: check_command check_nt!UPTIME
/usr/local/nagios/var/objects.cache: check_command check_nt!SERVICESTATE!-d SHOWALL -l W3SVC

n°1317039
roscocoltr​an
L'enfer c'est les utilisateurs
Posté le 27-07-2012 à 21:38:47  profilanswer
 

tu as ouvert ce fichier dans un broswer ?
/usr/local/nagios/share/docs/monitoring-windows.html


---------------
"Your god is too small", Giordano Bruno, 1548 - 1600
n°1317215
Slayer_hc
Posté le 31-07-2012 à 17:17:49  profilanswer
 

Salut,
 
Merci pour la petite orientation !
 
Il me manqué le service check_nt dans le fichier commands.cfg avec la command -s PASSWORD qui fonctionne ce coup-ci :)
 
Problème résolu, merci !


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Linux et OS Alternatifs
  réseaux et sécurité

  [Nagios]Problème de configuration check_nt [RESOLU]

 

Sujets relatifs
[Résolu]Problème de connexion X11Install d'un new serveur, problème d'import bdd [Résolu]
Probleme de suppression de lien symboliqueConfiguration Postfix Directly to Internet
probleme d'installation debian sur RAID LSIProblème Samba Debian 5
Probleme libxml2 sur CentOS 6.2DD 2To illisible après installation ubuntu
[Résolus]Problème d'installation de Gmeshprobleme de partition
Plus de sujets relatifs à : [Nagios]Problème de configuration check_nt [RESOLU]


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR