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

  FORUM HardWare.fr
  Systèmes & Réseaux Pro
  Logiciels d'entreprise

  Petit problème de config avec Nagios

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

Petit problème de config avec Nagios

n°38757
hppp
Serveur@home
Posté le 09-06-2008 à 09:57:01  profilanswer
 

Salut a tous
 
Je viens de mettre en place sur un serveur debian Nagios pour surveiller mon réseau et mes différents liens VPN, j'ai tous configurer mais j'ai une erreur au démarrage que je n'arrive pas a comprendre, et même sur google j'ai pas trouvé grand choses, voilà l'erreur:
 
Restarting nagios monitoring daemon: nagios
Nagios 1.4
Copyright (c) 1999-2006 Ethan Galstad (nagios@nagios.org)
Last Modified: 05-03-2006
License: GPL
 
Reading configuration data...
 
Error: Invalid max_attempts value for host 'adsles'
 
Error: Could not register host (config file '/etc/nagios/hosts.cfg', line 53)
 
 
***> One or more problems was encountered while processing the config files...
 
     Check your configuration file(s) to ensure that they contain valid
     directives and data defintions.  If you are upgrading from a previous
     version of Nagios, you should be aware that some variables/definitions
     may have been removed or modified in this version.  Make sure to read
     the HTML documentation on the main and host config files, as well as the
     'Whats New' section to find out what has changed.
 
errors in config!
 failed!
 
Je n'arrive pas a comprend se qu'il a avec le nom adsles, mais je viens de voire que les paquets debian pour nagios sont pas du tous à jour, il est encore à 1.4 alors que sur le site ils en sont a 3.0 stable, il faudrait mieux que je le compile je pense non?
Merci de votre aide.

mood
Publicité
Posté le 09-06-2008 à 09:57:01  profilanswer
 

n°38762
Quich'Man
No Fat...
Posté le 09-06-2008 à 10:44:40  profilanswer
 

colle nous le paragraphe de la ligne 53 de ton hosts.cfg  :)

n°38765
hppp
Serveur@home
Posté le 09-06-2008 à 10:57:17  profilanswer
 

Code :
  1. # Connexion ADSL ES Internet
  2. #————
  3. define host{
  4. use generic-host
  5. host_name adsles
  6. alias liaison ADSL ES
  7. address www.google.fr
  8. parents leopard
  9. }
 

Merci  :)


Message édité par hppp le 09-06-2008 à 10:57:51
n°38769
Quich'Man
No Fat...
Posté le 09-06-2008 à 11:20:32  profilanswer
 

ca a l'air normal, essaie d'enlever les espaces dans l'alias, mets un truc style liaison_adsl_ES. Me souviens plus trop mais dans le generic-host tu as quoi ? les check command ?


Message édité par Quich'Man le 09-06-2008 à 11:20:48
n°38770
hppp
Serveur@home
Posté le 09-06-2008 à 11:22:43  profilanswer
 

Code :
  1. define host{
  2.        name                            generic-host 
  3.        notifications_enabled           1     
  4.        event_handler_enabled           0     
  5.        flap_detection_enabled          0   
  6.        process_perf_data               1   
  7.        retain_status_information       1     
  8.        retain_nonstatus_information    1     
  9.        register                        0   
  10.        }
  11. # Passerelle leopard
  12. #————
  13. define host{
  14. use generic-host
  15. host_name leopard
  16. alias Passerelle Leopard
  17. address 172.25.2.240
  18. }
  19. # Merlin
  20. #————
  21. define host{
  22. use generic-host
  23. host_name merlin
  24. alias Serveur Merlin
  25. address 172.25.2.241
  26. }                                                                                         
  27. # Tiger
  28. #————
  29. define host{
  30. use generic-host
  31. host_name tiger
  32. alias Serveur Tiger
  33. address 172.25.2.242
  34. }
  35. # Connexion ADSL ES Internet
  36. #————
  37. define host{
  38. use generic-host
  39. host_name adsles
  40. alias liaison ADSL ES
  41. address www.google.fr
  42. parents leopard
  43. }
 


EDIT: avec liaison_adsl_ES même erreur.


Message édité par hppp le 09-06-2008 à 11:24:06
n°38774
Quich'Man
No Fat...
Posté le 09-06-2008 à 11:42:39  profilanswer
 

la resolution vers www.google.fr se fait bien sur ton serveur nagios ? essaie d'entrer 66.249.93.104 plutot que le nom dns.

n°38776
hppp
Serveur@home
Posté le 09-06-2008 à 11:47:29  profilanswer
 

même erreur , ça ne change rien.

n°38787
hppp
Serveur@home
Posté le 09-06-2008 à 13:29:08  profilanswer
 

et voilà, si je vire adsles j'ai cet erreur de merde:
 
Error: Invalid max_attempts value for host 'tiger'

n°38797
vrobaina
Hecho a Mano
Posté le 09-06-2008 à 14:58:33  profilanswer
 

en fait ton problème de vient pas de la déclaration de ton hosts mais des paramètres max_attemps de tes hosts.
 
Donnes-nous le contenu de la ligne max_attemps pour "Tiger" et "adsles".


---------------
Les cons, ça ose tout, et c'est même à ça qu'on les reconnait....
n°38800
hppp
Serveur@home
Posté le 09-06-2008 à 15:02:15  profilanswer
 

le problème c'est que j'en est pas dans hosts.cfg. Merci

mood
Publicité
Posté le 09-06-2008 à 15:02:15  profilanswer
 

n°38801
vrobaina
Hecho a Mano
Posté le 09-06-2008 à 15:12:33  profilanswer
 

normal c'est generalement dans les services (Services.cfg) que cela (max_attempts) se declare et non dans la section hosts.cfg
 
ps::
 
ou unix, dans le repertoire contenant tes fichiers cfg  (Hosts.cfg, Services;cfg),  tapes la commande suivante :
 
grep max_attempts *.cfg    
 
 
cela te permettra de savoir ou cette primitive est déclarée.


Message édité par vrobaina le 09-06-2008 à 15:20:15

---------------
Les cons, ça ose tout, et c'est même à ça qu'on les reconnait....
n°38802
hppp
Serveur@home
Posté le 09-06-2008 à 15:24:53  profilanswer
 

pas de retour de réponse pour grep max_attempts *.cfg  , je doit donc pas l'avoir.

n°38805
vrobaina
Hecho a Mano
Posté le 09-06-2008 à 15:32:37  profilanswer
 

fuck.....
 
Mais à ta place, j'oublierai la branche 1.x (qui date qui qui n'etait pas toujours stable) de Nagios pour passer sur une version plus recente 3.x.
 


---------------
Les cons, ça ose tout, et c'est même à ça qu'on les reconnait....
n°38811
hppp
Serveur@home
Posté le 09-06-2008 à 16:11:01  profilanswer
 

ok c'est se que je pensais faire, car même en ajoutant max_attempts dans les fichiers de config ça marche pas, donc je vais me le compiler . vous savez pas pourquoi nagios est pas a jour dans les paquets?

n°38818
LeKeiser
Appelez moi Marcel.
Posté le 09-06-2008 à 16:49:03  profilanswer
 

vrobaina a écrit :

fuck.....
 
Mais à ta place, j'oublierai la branche 1.x (qui date qui qui n'etait pas toujours stable) de Nagios pour passer sur une version plus recente 3.x.
 


elle n'est pas beta celle la? Ne faut-il pas prendre plutot la 2.X?


---------------
"I intend to live the first half of my life.I don't care about the rest."Errol Flynn."The difference between genius and stupidity is that genius has its limits."Albert Einstein
n°38821
hppp
Serveur@home
Posté le 09-06-2008 à 17:26:43  profilanswer
 

sur le site y a marqué stable.

n°38840
hppp
Serveur@home
Posté le 10-06-2008 à 08:29:00  profilanswer
 

bon je viens d'installer nagios 3.x mais quand je vérifie la config j'ai toutes ces erreurs:

Code :
  1. Checking services...
  2. Error: Service check command 'check-server-alive' specified in service 'Ping' for host 'adsl-es' not defined anywhere!
  3. Error: Check period '24×7' specified for service 'Ping' on host 'adsl-es' is not defined anywhere!
  4. Error: Notification period '24×7' specified for service 'Ping' on host 'adsl-es' is not defined anywhere!
  5. Error: Service check command 'check_ftp' specified in service 'FTP serveur' for host 'leopard' not defined anywhere!
  6. Error: Check period '24×7' specified for service 'FTP serveur' on host 'leopard' is not defined anywhere!
  7. Error: Notification period '24×7' specified for service 'FTP serveur' on host 'leopard' is not defined anywhere!
  8. Error: Service check command 'check-host-alive' specified in service 'Ping' for host 'leopard' not defined anywhere!
  9. Error: Check period '24×7' specified for service 'Ping' on host 'leopard' is not defined anywhere!
  10. Error: Notification period '24×7' specified for service 'Ping' on host 'leopard' is not defined anywhere!
  11. Error: Service check command 'check-host-alive' specified in service 'Ping' for host 'merlin' not defined anywhere!
  12. Error: Check period '24×7' specified for service 'Ping' on host 'merlin' is not defined anywhere!
  13. Error: Notification period '24×7' specified for service 'Ping' on host 'merlin' is not defined anywhere!
  14. Error: Service check command 'check-host-alive' specified in service 'Ping' for host 'tiger' not defined anywhere!
  15. Error: Check period '24×7' specified for service 'Ping' on host 'tiger' is not defined anywhere!
  16. Error: Notification period '24×7' specified for service 'Ping' on host 'tiger' is not defined anywhere!
  17. Checked 5 services.
  18. Checking hosts...
  19. Error: Host check command 'check-host-alive' specified for host 'adsl-es' is not defined anywhere!
  20. Error: Check period '24×7' specified for host 'adsl-es' is not defined anywhere!
  21. Error: Notification period '24×7' specified for host 'adsl-es' is not defined anywhere!
  22. Error: Host check command 'check-host-alive' specified for host 'leopard' is not defined anywhere!
  23. Error: Check period '24×7' specified for host 'leopard' is not defined anywhere!
  24. Error: Notification period '24×7' specified for host 'leopard' is not defined anywhere!
  25. Error: Host check command 'check-host-alive' specified for host 'merlin' is not defined anywhere!
  26. Error: Check period '24×7' specified for host 'merlin' is not defined anywhere!
  27. Error: Notification period '24×7' specified for host 'merlin' is not defined anywhere!
  28. Error: Host check command 'check-host-alive' specified for host 'tiger' is not defined anywhere!
  29. Error: Check period '24×7' specified for host 'tiger' is not defined anywhere!
  30. Error: Notification period '24×7' specified for host 'tiger' is not defined anywhere!
  31. Checked 4 hosts.
  32. Checking host groups...
  33. Checked 1 host groups.
  34. Checking service groups...
  35. Checked 0 service groups.
  36. Checking contacts...
  37. Error: Service notification command 'notify-by-email' specified for contact 'henry' is not defined anywhere!
  38. Error: Host notification command 'host-notify-by-email' specified for contact 'henry' is not defined anywhere!
  39. Error: Service notification period '24×7' specified for contact 'henry' is not defined anywhere!
  40. Error: Host notification period '24×7' specified for contact 'henry' is not defined anywhere!
  41. Checked 1 contacts.
  42. Checking contact groups...
  43. Checked 2 contact groups.
  44. Checking service escalations...
  45. Checked 0 service escalations.
  46. Checking service dependencies...
  47. Checked 0 service dependencies.
  48. Checking host escalations...
  49. Checked 0 host escalations.
  50. Checking host dependencies...
  51. Checked 0 host dependencies.
  52. Checking commands...
  53. Checked 0 commands.
  54. Checking time periods...
  55. Checked 5 time periods.
  56. Checking for circular paths between hosts...
  57. Checking for circular host and service dependencies...
  58. Checking global event handlers...
  59. Checking obsessive compulsive processor commands...
  60. Checking misc settings...
  61. Total Warnings: 0
  62. Total Errors:   31
  63. ***> One or more problems was encountered while running the pre-flight check...
  64.      Check your configuration file(s) to ensure that they contain valid
  65.      directives and data defintions.  If you are upgrading from a previous
  66.      version of Nagios, you should be aware that some variables/definitions
  67.      may have been removed or modified in this version.  Make sure to read
  68.      the HTML documentation regarding the config files, as well as the
  69.      'Whats New' section to find out what has changed.


 
Une recherche sur google ma permit de comprend qu'il me manquait un fichier ou il y avait toutes les commandes, mais je ne sais pas comment résoudre se problème. Merci de votre aide.

n°38865
hppp
Serveur@home
Posté le 11-06-2008 à 00:25:57  profilanswer
 

c'est bon , après 3 jours de lecture et de test de config je suis arrivé à mes fin, merci encore de votre aide.

n°38866
hppp
Serveur@home
Posté le 11-06-2008 à 00:43:50  profilanswer
 

Bon je reviens vers vous car j'ai un petit problème avec la commande  check_dhcp, quand je met ça :
 /usr/local/nagios/libexec/check_dhcp -s 172.25.2.240
CRITICAL: Pas de DHCPOFFERs reçus.
 
J'ai donc cette erreur , et je ne sais pas pourquoi, le serveur dhcp est dernier un tunnel vpn. Avez vous une idée pourquoi il arrive pas à le contacter? Car la il marche très bien. Merci

n°38915
LeKeiser
Appelez moi Marcel.
Posté le 11-06-2008 à 17:12:50  profilanswer
 

hppp a écrit :

c'est bon , après 3 jours de lecture et de test de config je suis arrivé à mes fin, merci encore de votre aide.


quoi tu as fait pour solutionner ton probleme?


---------------
"I intend to live the first half of my life.I don't care about the rest."Errol Flynn."The difference between genius and stupidity is that genius has its limits."Albert Einstein
n°38918
hppp
Serveur@home
Posté le 11-06-2008 à 18:43:33  profilanswer
 

J'avais tous simplement un problème de templates, j'ai fait un copier/coller de 24×7 pour le templates periode.

mood
Publicité
Posté le   profilanswer
 


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Systèmes & Réseaux Pro
  Logiciels d'entreprise

  Petit problème de config avec Nagios

 

Sujets relatifs
PB nagios et autorisationsProblème de capture de trame avec 802.1q
Problème dongle wifi qui ne fonctionne pas sur mon pcprobleme d'espace avec microsoft exchange
problème login Sambaproblème de restrictions avec squidguard
Problème perte licence Serveur 2003 SBSproblème de partage
Probleme de connexion fibre / jarretiere / switch 
Plus de sujets relatifs à : Petit problème de config avec Nagios


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