View Full Version : Renseignements conf
thibaut_91
11-07-2008, 10:57 AM
Bonjour,
Je viens d'installer Centreon cependant lorsque que je vais dans l'interface web je ne retrouve plus mes hosts et services. Il faut que je recommence ma configuration et certains services tel que check_ssh n'est plus disponible ... ??
Quelqu'un aurait il des explications à ce sujet ???
Cela vient t'il de mon installation et configuration de centreon car par exemple, avant mes fichiers de conf hosts etaient dans /objects et maintenant ils sont dans /etc ...
Si c'est mon installation qui n'est pas adapté quel changement dois je faire s'il vous plait ?
Merci par avance :)
Thibaut
naparuba
11-07-2008, 11:28 AM
Je ne comprends pas: tu as installé centreon, ou réinstallé centreon?
thibaut_91
11-07-2008, 11:37 AM
En fait j'ai installé mon nagios 3 tout se passe bien, j'ai mis mes plugins, ajouter mes hosts et tout !!!
Ensuite je me suis lancé dans l'installation de centreon 2 RC7
Pour finir après cette installation je suis allé sur l'interface web et je n'ai aucun hosts, aucun services visible
Et maintenant je vois que mes fichiers de configurations genre hosts.cfg, contacts.cfg se trouvent dans /usr/local/nagios/etc/ et non plus dans /usr/local/nagios/etc/objects/
mon fichier de commands.cfg se nomme maintenant check_commands.cfg etc
Je ne comprend pas en fait pourquoi cela ne va pas chercher mes fichiers préalablement configurer ...
De plus mon check-host-alive et nommé dorénavant check_host_alive, pourquoi ça ??
C'est peut être des questions cons mais bon ^^ ...
naparuba
11-07-2008, 11:41 AM
En fait tu as monté un nagios, fait ta conf à la main et tu ne la vois pas dans Centreon c'est bien ça?
Et en fait c'est normal :)
Centreon est une surcouche de Nagios, il ne va pas lui demander sa conf, mais fournir à nagios la conf justement :)
Bon tout n'est pas perdu hein, tu ne vas pas perdre ta conf, récupère les fichiers de conf sur ton serveur, dans Centreon tu as une page pour charger la configuration d'un Nagios existant dans Centreon, qui après va pouvoir la recréer.
thibaut_91
11-07-2008, 12:06 PM
D'accord je te remercie :)
Par contre je vais abuser de ta patience et ton temps mais est ce que tu aurais la manipulation pour faire ceci justement ?
Je n'ai pas cherché c'est juste si tu l'as sous la main c'est parfait :)
Et j'en profite pour te glisser un autre petit problème ...
J'ai ajouté un host et un service dans la configuration de centreon, je redémarre tout ca mais je ne vois rien dans l'interface, des explications ?
naparuba
11-07-2008, 12:21 PM
Déjà tu récupère avec un winscp tes fichiers de conf que tu as déjà remplis et que tu ne veux pas perdre.
Pour l'import, tu vas dans configuration->nagios->load, tu mets yes à remove all conf, tu browses le fichier et tu valides verify (nagios -v). Tu lances. Ca pour tes fichiers que tu as déjà modifiés (ordre: commandes, puis contacts, puis hosts puis services de mémoire).
Mais tu avais fait beaucoup de conf? Sinon tu peux la refaire dans Centreon, tu galèreras moins et ca t'aprendra comment faire justement.
Pour ton second problème, tu fais bien dans configuration->nagios->generate un move et un restart?
thibaut_91
11-07-2008, 12:33 PM
D'accord je te remercie !
Sinon oui je suis en train de tout refaire dans centreon la pour me familiariser avec :)
Et oui j'ai bien fait un move et un restart sur mon centreon mais rien ne fait.
Je vais te donner un petit renseignement a mon avis qui va te donner la cause du problème ...
En fait je n'ai pas réussis l'installation complète de centreon du fait que la dernière commande à faire pour que l'installation soit complète ne fonctionne pas.
J'ai suivis ce tuto pas à pas en prenant bien soin de tout faire et de plus j'ai refait cette install 4/5 fois étant donné que c'est un serveur virtuel et que je réalise des snapshots.
==> Installation_Nagios_Centreon_Fedora9 (http://fr.doc.centreon.com/Setup:Centreon2LinuxDistributionUseRPM/fr)
Et je bloque à cette commande :
==> /usr/local/nagios/bin/ndo2db-3x -c /usr/local/nagios/etc/ndo2db.cfg
Reponse ==> Support for the specified database server is either not yet supported, or was not found on your system.
Je suis perdu, je tente tout et n'importe quoi mais rien ne fait et je n'arrive pas à trouver quelqu'un pour résoudre ce problème ...
Tu pourrais m'aider pour résoudre ce soucis ??
PS : si tu veux que je tape des commandes pour avoir des renseignements, n'hésite surtout pas !!!!
naparuba
11-07-2008, 12:49 PM
Oui fais un:
ldd /usr/local/nagios/bin/ndo2db-3x
et
grep db_servertype /usr/local/nagios/etc/ndo2db.cfg
thibaut_91
11-07-2008, 12:56 PM
# ldd /usr/local/nagios/bin/ndo2db-3x
linux-gate.so.1 => (0x00110000)
libz.so.1 => /lib/libz.so.1 (0x00cec000)
libnsl.so.1 => /lib/libnsl.so.1 (0x001ac000)
libm.so.6 => /lib/libm.so.6 (0x00c9f000)
libc.so.6 => /lib/libc.so.6 (0x02065000)
/lib/ld-linux.so.2 (0x00c7f000)
# grep db_servertype /usr/local/nagios/etc/ndo2db.cfg
db_servertype=mysql
Je te donne une petite commande en plus si jamais ca peut t'aider ...
# tail -f /usr/local/nagios/var/nagios.log | grep ndomod
[1225573445] ndomod: Still unable to connect to data sink. 0 items lost, 4210 queued items to flush.
naparuba
11-07-2008, 01:06 PM
Tu as du avoir un problème à la compilation, tu n'as pas de mysql dans ton ndo2db, ce qui peut être embétant pour ne pas dire autre chose :p
Reprends dans ton tuto la partie de compilation de ndoutils, et reagrdes lors du ./configure s'il ne te crie pas qu'il te manque les libraires mysql de développements (typiquement mysql-dev ou quelque chose qui ressemble). Ajoute les (fedora donc fais nous un petit rpm -qa | grep mysql pour voir ce que tu as de mysql d'installé) puis recompile le, ca devrait aller mieux.
Ndo2db permet d'envoyer les informations de nagios vers mysql, là où centreon les lis. S'il ne peut pas, il ne voit rien tout simplement, d'où ton problème
Ps: les smileys me manque sur le forum :( :)
thibaut_91
11-07-2008, 01:20 PM
Bon je préfère te prévenir, je sais c'est imbuvable comme rapport mais je t'en fais part on en sait jamais :rolleyes:
Le rapport est en trois messages, je vois des petits NO de temps en temps ^^ ca doit venir de la ^^
COMMAND : ./configure --with-mysql-lib=/usr/lib/mysql
checking for a BSD-compatible install... /usr/bin/install -c
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking whether make sets $(MAKE)... yes
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking whether time.h and sys/time.h may both be included... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking ctype.h usability... yes
checking ctype.h presence... yes
checking for ctype.h... yes
checking dirent.h usability... yes
checking dirent.h presence... yes
checking for dirent.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking float.h usability... yes
checking float.h presence... yes
checking for float.h... yes
checking getopt.h usability... yes
checking getopt.h presence... yes
checking for getopt.h... yes
checking grp.h usability... yes
checking grp.h presence... yes
checking for grp.h... yes
checking for inttypes.h... (cached) yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking ltdl.h usability... no
checking ltdl.h presence... no
checking for ltdl.h... no
checking math.h usability... yes
checking math.h presence... yes
checking for math.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking pwd.h usability... yes
checking pwd.h presence... yes
checking for pwd.h... yes
checking regex.h usability... yes
checking regex.h presence... yes
checking for regex.h... yes
checking signal.h usability... yes
checking signal.h presence... yes
checking for signal.h... yes
checking socket.h usability... no
checking socket.h presence... no
checking for socket.h... no
checking stdarg.h usability... yes
checking stdarg.h presence... yes
checking for stdarg.h... yes
checking for stdint.h... (cached) yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking sys/ipc.h usability... yes
checking sys/ipc.h presence... yes
checking for sys/ipc.h... yes
checking sys/mman.h usability... yes
checking sys/mman.h presence... yes
checking for sys/mman.h... yes
checking sys/msg.h usability... yes
checking sys/msg.h presence... yes
checking for sys/msg.h... yes
checking sys/poll.h usability... yes
checking sys/poll.h presence... yes
checking for sys/poll.h... yes
checking sys/resource.h usability... yes
checking sys/resource.h presence... yes
checking for sys/resource.h... yes
checking sys/sendfile.h usability... yes
checking sys/sendfile.h presence... yes
checking for sys/sendfile.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking for sys/stat.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/timeb.h usability... yes
checking sys/timeb.h presence... yes
checking for sys/timeb.h... yes
checking for sys/types.h... (cached) yes
checking sys/un.h usability... yes
checking sys/un.h presence... yes
checking for sys/un.h... yes
checking for sys/wait.h... (cached) yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking tcpd.h usability... no
checking tcpd.h presence... no
checking for tcpd.h... no
checking for unistd.h... (cached) yes
checking values.h usability... yes
checking values.h presence... yes
checking for values.h... yes
checking for an ANSI C-conforming const... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for mode_t... yes
checking for pid_t... yes
checking for size_t... yes
checking return type of signal handlers... void
checking for uid_t in sys/types.h... yes
checking type of array argument to getgroups... gid_t
thibaut_91
11-07-2008, 01:20 PM
checking for int... yes
checking size of int... 4
checking for short... yes
checking size of short... 2
checking for long... yes
checking size of long... 4
checking for uint32_t... yes
checking for u_int32_t... yes
checking for int32_t... yes
checking for getopt_long... yes
checking for main in -lnsl... yes
checking for socket in -lsocket... no
checking for main in -lwrap... no
checking for strdup... yes
checking for strstr... yes
checking for strtoul... yes
checking for initgroups... yes
checking for strtof... ^C[root@LinNagios ndoutils-1.4b7]# ./configure --with-mysql-lib=/usr/lib/mysql
checking for a BSD-compatible install... /usr/bin/install -c
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking whether make sets $(MAKE)... yes
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking whether time.h and sys/time.h may both be included... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking ctype.h usability... yes
checking ctype.h presence... yes
checking for ctype.h... yes
checking dirent.h usability... yes
checking dirent.h presence... yes
checking for dirent.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking float.h usability... yes
checking float.h presence... yes
checking for float.h... yes
checking getopt.h usability... yes
checking getopt.h presence... yes
checking for getopt.h... yes
checking grp.h usability... yes
checking grp.h presence... yes
checking for grp.h... yes
checking for inttypes.h... (cached) yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking ltdl.h usability... no
checking ltdl.h presence... no
checking for ltdl.h... no
checking math.h usability... yes
checking math.h presence... yes
checking for math.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking pwd.h usability... yes
checking pwd.h presence... yes
checking for pwd.h... yes
checking regex.h usability... yes
checking regex.h presence... yes
checking for regex.h... yes
checking signal.h usability... yes
checking signal.h presence... yes
checking for signal.h... yes
checking socket.h usability... no
checking socket.h presence... no
checking for socket.h... no
checking stdarg.h usability... yes
checking stdarg.h presence... yes
checking for stdarg.h... yes
checking for stdint.h... (cached) yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking sys/ipc.h usability... yes
checking sys/ipc.h presence... yes
checking for sys/ipc.h... yes
checking sys/mman.h usability... yes
checking sys/mman.h presence... yes
checking for sys/mman.h... yes
checking sys/msg.h usability... yes
checking sys/msg.h presence... yes
checking for sys/msg.h... yes
checking sys/poll.h usability... yes
checking sys/poll.h presence... yes
checking for sys/poll.h... yes
checking sys/resource.h usability... yes
checking sys/resource.h presence... yes
checking for sys/resource.h... yes
checking sys/sendfile.h usability... yes
checking sys/sendfile.h presence... yes
checking for sys/sendfile.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking for sys/stat.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/timeb.h usability... yes
checking sys/timeb.h presence... yes
checking for sys/timeb.h... yes
checking for sys/types.h... (cached) yes
checking sys/un.h usability... yes
checking sys/un.h presence... yes
checking for sys/un.h... yes
checking for sys/wait.h... (cached) yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking tcpd.h usability... no
checking tcpd.h presence... no
checking for tcpd.h... no
checking for unistd.h... (cached) yes
checking values.h usability... yes
checking values.h presence... yes
checking for values.h... yes
checking for an ANSI C-conforming const... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for mode_t... yes
checking for pid_t... yes
checking for size_t... yes
checking return type of signal handlers... void
checking for uid_t in sys/types.h... yes
checking type of array argument to getgroups... gid_t
checking for int... yes
checking size of int... 4
checking for short... yes
checking size of short... 2
checking for long... yes
checking size of long... 4
checking for uint32_t... yes
checking for u_int32_t... yes
checking for int32_t... yes
checking for getopt_long... yes
checking for main in -lnsl... yes
checking for socket in -lsocket... no
checking for main in -lwrap... no
checking for strdup... yes
checking for strstr... yes
checking for strtoul... yes
checking for initgroups... yes
checking for strtof... yes
checking for type of socket size... size_t
checking for linker flags for loadable modules... -shared
checking for compress in -lz... yes
checking for mysql_store_result in -lmysqlclient... no
checking for mysql_connect in -lmysqlclient... no
*** MySQL library could not be located... **************************
You chose to compile NDBXT with MySQL support, but I was unable to
locate the MySQL library on your system. If the library is
installed, use the --with-mysql-lib argument to specify the
location of the MySQL library.
NOTE: After you install the necessary libraries on your system:
1. Make sure /etc/ld.so.conf has an entry for the directory in
which the MySQL libraries are installed.
2. Run 'ldconfig' to update the run-time linker options.
3. Run 'make devclean' in the NDBXT distribution to clean out
any old references to your previous compile.
4. Rerun the configure script.
TIP: Try the following....
./configure --with-mysql-lib=/usr/lib/mysql
************************************************** ******************
checking mysql/mysql.h usability... no
checking mysql/mysql.h presence... no
checking for mysql/mysql.h... no
*** MySQL include file could not be located... **********************
You chose to compile NDBXT with MySQL support, but I was unable to
locate <mysql/mysql.h> on your system. If the include file is
installed, use the --with-mysql-inc argument to specify the location
of the MySQL include file.
************************************************** ******************
checking for PQconnectdb in -lpq... no
*** PostgreSQL library could not be located... *********************
You chose to compile NDBXT with PostgreSQL support, but I was
unable to locate the PostgreSQL library on your system. If the
library is installed, use the --with-pgsql-lib argument to specify
the location of the PostgreSQL library.
NOTE: After you install the necessary libraries on your system:
1. Make sure /etc/ld.so.conf has an entry for the directory in
which the PostgreSQL libraries are installed.
2. Run 'ldconfig' to update the run-time linker options.
3. Run 'make devclean' in the NDBXT distribution to clean out
any old references to your previous compile.
4. Rerun the configure script.
************************************************** ******************
checking libpq-fe.h usability... no
checking libpq-fe.h presence... no
checking for libpq-fe.h... no
*** PostgreSQL include file could not be located... ****************
You chose to compile NDBXT with PostgreSQL support, but I was unable
to locate <libpq-fe.h> on your system. If the include file is
installed, use the --with-pgsql-inc argument to specify the location
of the PostgreSQL include file.
************************************************** ******************
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating subst
config.status: creating include/config.h
config.status: include/config.h is unchanged
*** Configuration summary for ndoutils 1.4b7 10-31-2007 ***:
General Options:
-------------------------
NDO2DB user: nagios
NDO2DB group: nagios
Review the options above for accuracy. If they look okay,
type 'make' to compile the NDO utilities.
thibaut_91
11-07-2008, 01:21 PM
COMMAND : make
cd ./src/; make ; cd ..
make[1]: entrant dans le répertoire « /Telechargements/ndoutils-1.4b7/src »
make ndo2db-2x
make[2]: entrant dans le répertoire « /Telechargements/ndoutils-1.4b7/src »
make[2]: « ndo2db-2x » est à jour.
make[2]: quittant le répertoire « /Telechargements/ndoutils-1.4b7/src »
make ndo2db-3x
make[2]: entrant dans le répertoire « /Telechargements/ndoutils-1.4b7/src »
make[2]: « ndo2db-3x » est à jour.
make[2]: quittant le répertoire « /Telechargements/ndoutils-1.4b7/src »
make ndomod-2x.o
make[2]: entrant dans le répertoire « /Telechargements/ndoutils-1.4b7/src »
make[2]: « ndomod-2x.o » est à jour.
make[2]: quittant le répertoire « /Telechargements/ndoutils-1.4b7/src »
make ndomod-3x.o
make[2]: entrant dans le répertoire « /Telechargements/ndoutils-1.4b7/src »
make[2]: « ndomod-3x.o » est à jour.
make[2]: quittant le répertoire « /Telechargements/ndoutils-1.4b7/src »
make[1]: quittant le répertoire « /Telechargements/ndoutils-1.4b7/src »
Bon pour ce qui est du make c'est normal j'ai rien desinstallé ou autres :) mais je pense qu'il y a des petites réponses dans le rapport au dessus ...
Suspens ... ^^
PS : j'avou que j'aurais pu te coller quelques smyles dans les rapports c'est plus convivial :P
naparuba
11-07-2008, 03:15 PM
Yep c'est ça: MySQL dev n'est pas en place. Donc soit tu as les packages d'installés et ./configure ne les trouve pas, soit tu ne les as pas.
En root:
updatedb
locate mysql.h
Et vois si tu as le fichier mysql.h quelque part.
Si tu l'as, disons dans /usr/lib/mysql
./configure --with-mysql-lib=/usr/lib/mysql
Si tu ne l'as pas, yum search mysql
et tu regardes, il dois y avoir un package devel. Installe le et refais un ./configure
thibaut_91
11-07-2008, 04:07 PM
Ok ok jte remercie de ton aide, mais ce que je vais faire c'est que je vais tout recommencer du début pour faire quelque chose de propre ! Donc je te tiens au courant de la suite des évènements :)
En attendant je te souhaite un très bon week-end prolongé j'espère pour toi aussi et encore merci :)
naparuba
11-07-2008, 04:17 PM
Oui très prolongé héhéhé.
Bon courage et bon week end :)