Serveur de supervision : Nagios et Centreon

Fermé
guitou429 Messages postés 198 Date d'inscription jeudi 22 novembre 2007 Statut Membre Dernière intervention 17 septembre 2012 - 27 avril 2011 à 14:47
guitou429 Messages postés 198 Date d'inscription jeudi 22 novembre 2007 Statut Membre Dernière intervention 17 septembre 2012 - 28 avril 2011 à 13:54
Bonjour,

Je vous écris pour plusieurs petits soucis avec Nagios et Centreon.
Lorsque j'ajoute un host dans Centreon, je sauvegarde la conf puis j'exporte vers Nagios. Je redémarre Nagios le host apparait bien sous Nagios mais :

* Sous centron, sous la supervision, je ne vois aucun serveur... alors que je les vois bien sous configuration

* Sous Nagios, je vois bien les hosts mais avec beaucoup de services critiques... alors qu'ils ne le sont pas

* J'ai des erreurs dans mon nagios.log. Voici un extrait :
[1303907549] Auto-save of retention data completed successfully.
[1303907597] ndomod: Still unable to connect to data sink. 19225 items lost, 5000 queued items to flush.
[1303907609] Warning: Return code of 13 for check of service 'Ping' on host 'srv-first' was out of bounds.
[1303907609] Warning: Return code of 13 for check of service 'Memory' on host 'srv-first' was out of bounds.

Ces erreurs se répètent sans cesse.

* J'ai ce message dans mon status.log :
plugin_output= { Return code of 13 is out of bounds}

* Quand je redémarre ndo, j'ai ce message :
Starting ndo:Could not bind socket: Address already in use
done.
J'ai pu lire qu'il fallait supprimer le fichier /usr/local/nagios/var/ndo.sock
mais je ne l'ai pas....

Je pense que toutes ces erreurs doivent être liées mais je ne sais plus où chercher...

Merci par avance de votre aide précieuse!!!

18 réponses

IvyAlice Messages postés 379 Date d'inscription lundi 17 septembre 2007 Statut Membre Dernière intervention 14 septembre 2013 32
27 avril 2011 à 16:33
là où tu as installer ton nagios, tu dois avoir un répertoire libexec
(pour moi c'était dans /usr/local/nagios/libexec, mais si tu l'as installer avec apt-get ou aptitude l'arborescence va ailleurs, je sais plus exactement où, peut-être dans /etc/nagios)
tu peux toujours le chercher avec "locate libexec" si tu l'as installé il y a un moment.

bref une fois que tu es dedans tu lance la commande que lance nagios
#./check_xyz -h
là il t'affiche l'aide pour ce plugin.

D'après les noms tu ne devrais pas avoir de problème à retrouvé les plugins utilisés par Nagios qui te posent problème.

Ivy
1
guitou429 Messages postés 198 Date d'inscription jeudi 22 novembre 2007 Statut Membre Dernière intervention 17 septembre 2012 17
Modifié par guitou429 le 27/04/2011 à 17:02
root@srv-surv:/usr/local/nagios/libexec# ./check_ping -H 192.168.23.187 -w 10,5% -c 15,10%
PING OK - Packet loss = 0%, RTA = 0.22 ms|rta=0.222000ms;10.000000;15.000000;0.000000 pl=0%;5;10;0


Ca a l'air de marché alors que sous nagios il me met critical
1
IvyAlice Messages postés 379 Date d'inscription lundi 17 septembre 2007 Statut Membre Dernière intervention 14 septembre 2013 32
27 avril 2011 à 17:12
Là il te met OK pour les valeurs limites.
il faut p-e que tu adapte/vérifie les valeurs limites que nagios utilise.

va voir dans le fichier /usr/local/nagios/etc/objects/<xyz>.cfg
(là où est défini le service pour le host)

tu dois trouvé dans la définition du service quelque chose comme ceci

check_command check_ping!3000.0,80%!5000.0,100%

Ivy
1
guitou429 Messages postés 198 Date d'inscription jeudi 22 novembre 2007 Statut Membre Dernière intervention 17 septembre 2012 17
27 avril 2011 à 17:22
root@srv-surv:/usr/local/nagios/libexec# ./check_ping -H 192.168.23.187 -w 3000.0,80% -c 5000.0,100% -p5
PING OK - Packet loss = 0%, RTA = 0.24 ms|rta=0.236000ms;3000.000000;5000.000000;0.000000 pl=0%;80;100;0


Avec les valeurs issues du fichier
1

Vous n’avez pas trouvé la réponse que vous recherchez ?

Posez votre question
IvyAlice Messages postés 379 Date d'inscription lundi 17 septembre 2007 Statut Membre Dernière intervention 14 septembre 2013 32
Modifié par IvyAlice le 27/04/2011 à 18:10
Bon admettons alors que les valeurs limites sont OK dans les fichiers de conf.

est-ce que tes fichiers et plugins appartiennent tous bien à l'utilisateur nagios ?
# ls -al /usr/local/nagios/libexec

fait pareil pour les fichiers que tu as exporté depuis centréon
1
guitou429 Messages postés 198 Date d'inscription jeudi 22 novembre 2007 Statut Membre Dernière intervention 17 septembre 2012 17
Modifié par guitou429 le 27/04/2011 à 22:11
alors pour libexec, certains fichiers sont en root:nagios et d'autres en nagios:nagios

Je les mets tous en nagios:nagios ?

Quels sont les fichiers que j'ai exporté depuis Centreon ? Où sont-ils ? Si il s'agit des fichiers contenu dans le repertoire object de nagios/etc/, ils sont en www-data:www-data
1
guitou429 Messages postés 198 Date d'inscription jeudi 22 novembre 2007 Statut Membre Dernière intervention 17 septembre 2012 17
Modifié par guitou429 le 27/04/2011 à 22:42
Alors après changement de droits, je reprends les points qui me font défaut :

* Sous Nagios, je vois bien les hosts mais avec beaucoup de services critiques... alors qu'ils ne le sont pas (exemple le ping)

* J'ai des erreurs dans mon nagios.log. Voici un extrait : (en gras lles erreurs et incohérences)
1303935903] Caught SIGTERM, shutting down...
[1303935903] Successfully shutdown... (PID=20935)
[1303935903] ndomod: Shutdown complete.
[1303935903] Event broker module '/usr/local/nagios/bin/ndomod.o' deinitialized successfully.
[1303935903] Nagios 3.2.3 starting... (PID=21678)
[1303935903] Local time is Wed Apr 27 22:25:03 CEST 2011
[1303935903] LOG VERSION: 2.0
[1303935903] ndomod: NDOMOD 1.4b9 (10-27-2009) Copyright (c) 2009 Nagios Core Development Team and Community Contributors
[1303935903] ndomod: Could not open data sink! I'll keep trying, but some output may get lost...[1303935903] Event broker module '/usr/local/nagios/bin/ndomod.o' initialized successfully.
[1303935903] Finished daemonizing... (New PID=21679)
[1303935903] INITIAL HOST STATE: Centreon-Server;UP;HARD;1;PING OK - Packet loss = 0%, RTA = 0.02 ms
[1303935903] INITIAL HOST STATE: srv-data;UP;HARD;1;PING OK - Packet loss = 0%, RTA = 0.78 ms
[1303935903] INITIAL HOST STATE: srv-first;UP;HARD;1;PING OK - Packet loss = 0%, RTA = 0.78 ms
[1303935903] INITIAL HOST STATE: srv-web;UP;HARD;1;PING OK - Packet loss = 0%, RTA = 0.29 ms[1303935903] INITIAL SERVICE STATE: Centreon-Server;Disk-/;CRITICAL;HARD;3;(null)
[1303935903] INITIAL SERVICE STATE: Centreon-Server;HTTP;OK;HARD;1;HTTP OK: HTTP/1.1 200 OK - 454 bytes in 0.000 second response time
[1303935903] INITIAL SERVICE STATE: Centreon-Server;Load;CRITICAL;HARD;3;(null)
[1303935903] INITIAL SERVICE STATE: Centreon-Server;Memory;CRITICAL;HARD;3;(null)
[1303935903] INITIAL SERVICE STATE: Centreon-Server;Ping;CRITICAL;HARD;3;(null)
[1303935903] INITIAL SERVICE STATE: srv-data;CPU;CRITICAL;HARD;3;(null)
[1303935903] INITIAL SERVICE STATE: srv-data;DNS;OK;HARD;1;DNS OK: 0.006 seconds response time. -s returns srv-data.chdl.local.
[1303935903] INITIAL SERVICE STATE: srv-data;Disk-C;CRITICAL;HARD;3;(null)
[1303935903] INITIAL SERVICE STATE: srv-data;Memory;CRITICAL;HARD;3;(null)
[1303935903] INITIAL SERVICE STATE: srv-data;Ping;CRITICAL;HARD;3;(null)
[1303935903] INITIAL SERVICE STATE: srv-first;CPU;CRITICAL;HARD;3;(null)
[1303935903] INITIAL SERVICE STATE: srv-first;DNS;OK;HARD;1;DNS OK: 0.006 seconds response time. -s returns srv-first.chdl.local.
[1303935903] INITIAL SERVICE STATE: srv-first;Disk-C;CRITICAL;HARD;3;(null)
[1303935903] INITIAL SERVICE STATE: srv-first;Memory;CRITICAL;HARD;3;(null)
[1303935903] INITIAL SERVICE STATE: srv-first;Ping;CRITICAL;HARD;3;(null)
[1303935903] INITIAL SERVICE STATE: srv-first;dhcp;UNKNOWN;HARD;3;Usage:
[1303935903] INITIAL SERVICE STATE: srv-web;Disk-/;CRITICAL;HARD;3;(null)
[1303935903] INITIAL SERVICE STATE: srv-web;HTTP;OK;HARD;1;HTTP OK: HTTP/1.1 200 OK - 1116 bytes in 0.002 second response time
[1303935903] INITIAL SERVICE STATE: srv-web;Load;CRITICAL;HARD;3;(null)
[1303935903] INITIAL SERVICE STATE: srv-web;Memory;CRITICAL;HARD;3;(null)
[1303935903] INITIAL SERVICE STATE: srv-web;Ping;CRITICAL;HARD;3;(null)[1303936815] ndomod: Still unable to connect to data sink. 3 items lost, 5000 queued items to flush.
1
guitou429 Messages postés 198 Date d'inscription jeudi 22 novembre 2007 Statut Membre Dernière intervention 17 septembre 2012 17
28 avril 2011 à 13:54
Bon j'avance un peu dans mes recherches... Pour tous mes serveurs, j'ai réussi à mettre en place et a avoir en up les test http, ping et dns.

Je suis entrain de mettre en place le plug in check_local_disk qui utilise la commande libexec check_disk. Sous Nagios, je récupère un status Unknown argument. Quand je teste la commande sous Centreon, il me renvoie une erreur : Could not find macro $USER 2$

Je ne sais pas pourquoi il me dit cela alors que je n'utilise pas cet argument.

Quelqu'un peut-il m'aider ???
1
guitou429 Messages postés 198 Date d'inscription jeudi 22 novembre 2007 Statut Membre Dernière intervention 17 septembre 2012 17
27 avril 2011 à 15:16
je me permets de relmancer le sujet svp c'est urgent. Merci beaucoup par avance
0
IvyAlice Messages postés 379 Date d'inscription lundi 17 septembre 2007 Statut Membre Dernière intervention 14 septembre 2013 32
27 avril 2011 à 16:06
Salut Guitou,

Essait de lancé ton plugin à la main (dans libexec) pour voir ce qu'il te retourne, par ce que manifestement ce n'est pas la bonne valeur, mais l'erreur t'aidera p-e à corriger les paramètres envoyés par nagios à ta commande.

Ivy
0
guitou429 Messages postés 198 Date d'inscription jeudi 22 novembre 2007 Statut Membre Dernière intervention 17 septembre 2012 17
27 avril 2011 à 16:18
Salut IvyAlice et tout d'abord merci de ta réponse.
Comment fais-tu pour lancer le plug-in manuellement (désolé, je ne suis pas trop callé, je découvres)
0
guitou429 Messages postés 198 Date d'inscription jeudi 22 novembre 2007 Statut Membre Dernière intervention 17 septembre 2012 17
27 avril 2011 à 16:31
Alors si je ais la commande :
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

J'ai ca en retour :
Nagios Core 3.2.3
Copyright (c) 2009-2010 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 10-03-2010
License: GPL

Website: https://www.nagios.org/
Reading configuration data...
Read main config file okay...
Processing object config file '/usr/local/nagios/etc/hostTemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/hosts.cfg'...
Processing object config file '/usr/local/nagios/etc/serviceTemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/services.cfg'...
Processing object config file '/usr/local/nagios/etc/misccommands.cfg'...
Processing object config file '/usr/local/nagios/etc/checkcommands.cfg'...
Processing object config file '/usr/local/nagios/etc/contactgroups.cfg'...
Processing object config file '/usr/local/nagios/etc/contacts.cfg'...
Processing object config file '/usr/local/nagios/etc/hostgroups.cfg'...
Processing object config file '/usr/local/nagios/etc/servicegroups.cfg'...
Processing object config file '/usr/local/nagios/etc/timeperiods.cfg'...
Processing object config file '/usr/local/nagios/etc/escalations.cfg'...
Processing object config file '/usr/local/nagios/etc/dependencies.cfg'...
Processing object config file '/usr/local/nagios/etc/meta_commands.cfg'...
Processing object config file '/usr/local/nagios/etc/meta_contact.cfg'...
Processing object config file '/usr/local/nagios/etc/meta_contactgroup.cfg'...
Processing object config file '/usr/local/nagios/etc/meta_dependencies.cfg'...
Processing object config file '/usr/local/nagios/etc/meta_escalations.cfg'...
Processing object config file '/usr/local/nagios/etc/meta_host.cfg'...
Processing object config file '/usr/local/nagios/etc/meta_services.cfg'...
Processing object config file '/usr/local/nagios/etc/meta_timeperiod.cfg'...
Read object config files okay...

Running pre-flight check on configuration data...

Checking services...
Checked 21 services.
Checking hosts...
Checked 4 hosts.
Checking host groups...
Checked 2 host groups.
Checking service groups...
Checked 0 service groups.
Checking contacts...
Checked 1 contacts.
Checking contact groups...
Checked 1 contact groups.
Checking service escalations...
Checked 0 service escalations.
Checking service dependencies...
Checked 0 service dependencies.
Checking host escalations...
Checked 0 host escalations.
Checking host dependencies...
Checked 0 host dependencies.
Checking commands...
Checked 54 commands.
Checking time periods...
Checked 5 time periods.
Checking for circular paths between hosts...
Checking for circular host and service dependencies...
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 0
Total Errors: 0

Things look okay - No serious problems were detected during the pre-flight check

C'est ca le test souhaité?
0
guitou429 Messages postés 198 Date d'inscription jeudi 22 novembre 2007 Statut Membre Dernière intervention 17 septembre 2012 17
Modifié par guitou429 le 27/04/2011 à 16:43
Sinon quand je fais ce test là :
./check_nagios -F log.log

J'ai ça :
You must provide a process string
0
IvyAlice Messages postés 379 Date d'inscription lundi 17 septembre 2007 Statut Membre Dernière intervention 14 septembre 2013 32
27 avril 2011 à 17:03
ça serait plutôt un truc genre
./check_nagios -F /usr/local/nagios/var/nagios.log -e 3 -C nagios
0
guitou429 Messages postés 198 Date d'inscription jeudi 22 novembre 2007 Statut Membre Dernière intervention 17 septembre 2012 17
27 avril 2011 à 16:46
./check_ping -H localhost

<wrta> was not set
check_ping: Could not parse arguments
Usage:
check_ping -H <host_address> -w <wrta>,<wpl>% -c <crta>,<cpl>%
[-p packets] [-t timeout] [-4|-6]


Désolé, on se croise avec les messages lol
Voici un test. J'ai également essayé avec l'adresse IP ca marche pas non plus
0
IvyAlice Messages postés 379 Date d'inscription lundi 17 septembre 2007 Statut Membre Dernière intervention 14 septembre 2013 32
27 avril 2011 à 16:46
OK alors pour check_nrpe c'est un peu différent puisqu'il doit y avoir l'agent NRPE qui tourne sur l'autre machine.

Bon ici c'est un autre problème il dit qu'il ne le trouve pas.
Est-ce que tu as bien installé nrpe ? c'est un packet en plus de nagios et des plugins il me semble.


c'est ./check_nagios si tu es dans le répertoire où se trouve les check_xyz

Ivy
0
guitou429 Messages postés 198 Date d'inscription jeudi 22 novembre 2007 Statut Membre Dernière intervention 17 septembre 2012 17
27 avril 2011 à 16:47
et avec check_ping alors ?
0
IvyAlice Messages postés 379 Date d'inscription lundi 17 septembre 2007 Statut Membre Dernière intervention 14 septembre 2013 32
27 avril 2011 à 16:59
./check_ping -H <ipDest> -w 10,5% -c 15,10%

par exemple
(premier chiffre = seul de warning rta 2ème chiffre seuil de warning de % de packet perdu)
0
guitou429 Messages postés 198 Date d'inscription jeudi 22 novembre 2007 Statut Membre Dernière intervention 17 septembre 2012 17
Modifié par guitou429 le 27/04/2011 à 23:02
Je précise que les services sont critical sur nagios mais aussi sur centreon.
Sauf le http et le dns.

Je précise également que sous centreon si je vais dans configuration / services/ et que j'ajoute un service test ping dans la liste déroulante check_command, je ne trouve pas check_ping ... est-ce normal. *il m'en manque plein d'autres...
0