PDA

View Full Version : Problème d'ajout d'hôtes


riki17
5th February 2008, 11:16
Bonjour,
je suis nouveau, j'ai installé Nagios puis Centreon dans le but de faire du monitoring sur mon réseau.
J'ai crée un hôte avec Centreon pour tester le fonctionnement, cet hôte apparait dans le menu CONFIGURATION mais pas dans le menu MONITORING et de même pour les services. J'ai bien coché "Activé" lors de la création mais je ne vois toujours rien et je ne sais pas comment faire...pourriez vous m'aider svp?
Cordialement

naparuba
5th February 2008, 11:24
As tu bien régénéré la configuration de Nagios après avoir ajouté ton host?

riki17
5th February 2008, 11:27
Merci de me repondre aussi rapidement.
Oui j'ai bien généré le fichier de nagios et j'ai coché la case RESTART
voici ce que ça donne :


Nagios 3.0rc2
Copyright (c) 1999-2008 Ethan Galstad (http://www.nagios.org)
Last Modified: 01-29-2008
License: GPL

Reading configuration data...

Warning: aggregate_status_updates directive ignored. All status file updates are now aggregated.
Warning: downtime_file variable ignored. Downtime entries are now stored in the status and retention files.
Warning: comment_file variable ignored. Comments are now stored in the status and retention files.
Running pre-flight check on configuration data...

Checking services...
Checked 1 services.
Checking hosts...
Checked 1 hosts.
Checking host groups...
Checked 1 host groups.
Checking service groups...
Checked 0 service groups.
Checking contacts...
Error: Contact 'Montisano Riccardo' has no service notification commands defined!
Error: Contact 'Montisano Riccardo' has no host notification commands defined!
Warning: Contact 'Montisano Riccardo' has no service notification time period defined!
Warning: Contact 'Montisano Riccardo' has no host notification time period defined!
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 44 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: 2
Total Errors: 2

***> One or more problems was encountered while running the pre-flight check...

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 regarding the config files, as well as the
'Whats New' section to find out what has changed.

juraj
5th February 2008, 12:13
And that's it.
Fill in the host/service notification details and periods for the contact and you're good.

riki17
5th February 2008, 12:23
Thanks for your help juraj.
I generate the new config file for Nagios :
Nagios 3.0rc2
Copyright (c) 1999-2008 Ethan Galstad (http://www.nagios.org)
Last Modified: 01-29-2008
License: GPL

Reading configuration data...

Warning: aggregate_status_updates directive ignored. All status file updates are now aggregated.
Warning: downtime_file variable ignored. Downtime entries are now stored in the status and retention files.
Warning: comment_file variable ignored. Comments are now stored in the status and retention files.
Running pre-flight check on configuration data...

Checking services...
Checked 1 services.
Checking hosts...
Checked 1 hosts.
Checking host groups...
Checked 1 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 44 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


Now I've no problem in my config file but I've still the main problem :
I can see my hosts in the CONFIGURATION index but not in the MONITORING index and this same thing for services...have you a solution?

Guigui2607
5th February 2008, 12:39
Si juste après avoir cliqué sur MONITORING, la liste affichée est vide, c'est que tout va bien. :cool:
Essayes de cliquer dans le menu latéral à gauche sur
> Services Détails puis sur > Tous les Services

Là tu devrais avoir la liste complète... :roll:

juraj
5th February 2008, 12:48
Did you also click on that "move export files" radio button?
You should have there also a section like:

cgi.cfg - movement OK
checkcommands.cfg - movement OK
contactgroups.cfg - movement OK
contacts.cfg - movement OK
dependencies.cfg - movement OK
escalations.cfg - movement OK
hostextinfo.cfg - movement OK
hostgroups.cfg - movement OK
hosts.cfg - movement OK
meta_commands.cfg - movement OK
meta_contact.cfg - movement OK
meta_contactgroup.cfg - movement OK
meta_dependencies.cfg - movement OK
meta_escalations.cfg - movement OK
meta_host.cfg - movement OK
meta_hostgroup.cfg - movement OK
meta_services.cfg - movement OK
meta_timeperiod.cfg - movement OK
misccommands.cfg - movement OK
nagios.cfg - movement OK
perfparse.cfg - movement OK
resource.cfg - movement OK
serviceextinfo.cfg - movement OK
servicegroups.cfg - movement OK
services.cfg - movement OK
timeperiods.cfg - movement OK

Running configuration check...done.
Reloading nagios configuration...done

but as noted above, you will see by default only the hosts/services with problems. Go and visit monitoring-services-all services, they should all be there.

riki17
5th February 2008, 12:49
Merci pour ton aide Guigui,
mais que ce soit le detail des services ou des hosts, la liste est vide alors que dans configuration je vois mes hosts...

riki17
5th February 2008, 13:03
thanks juraj that's my new config file :
Nagios 3.0rc2
Copyright (c) 1999-2008 Ethan Galstad (http://www.nagios.org)
Last Modified: 01-29-2008
License: GPL

Reading configuration data...

Warning: aggregate_status_updates directive ignored. All status file updates are now aggregated.
Warning: downtime_file variable ignored. Downtime entries are now stored in the status and retention files.
Warning: comment_file variable ignored. Comments are now stored in the status and retention files.
Running pre-flight check on configuration data...

Checking services...
Checked 1 services.
Checking hosts...
Checked 1 hosts.
Checking host groups...
Checked 1 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 44 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

cgi.cfg - déplacement OK
checkcommands.cfg - déplacement OK
contactgroups.cfg - déplacement OK
contacts.cfg - déplacement OK
dependencies.cfg - déplacement OK
escalations.cfg - déplacement OK
hostextinfo.cfg - déplacement OK
hostgroups.cfg - déplacement OK
hosts.cfg - déplacement OK
meta_commands.cfg - déplacement OK
meta_contact.cfg - déplacement OK
meta_contactgroup.cfg - déplacement OK
meta_dependencies.cfg - déplacement OK
meta_escalations.cfg - déplacement OK
meta_host.cfg - déplacement OK
meta_hostgroup.cfg - déplacement OK
meta_services.cfg - déplacement OK
meta_timeperiod.cfg - déplacement OK
misccommands.cfg - déplacement OK
nagios.cfg - déplacement OK
perfparse.cfg - déplacement OK
resource.cfg - déplacement OK
serviceextinfo.cfg - déplacement OK
servicegroups.cfg - déplacement OK
services.cfg - déplacement OK
timeperiods.cfg - déplacement OK


But I still not can see my hosts =(

riki17
5th February 2008, 13:04
I've a new problem now in Nagios Status Map I have this page :

Whoops!

Error: Could not read host and service status information!

The most common cause of this error message (especially for new users), is the fact that Nagios is not actually running. If Nagios is indeed not running, this is a normal error message. It simply indicates that the CGIs could not obtain the current status of hosts and services that are being monitored. If you've just installed things, make sure you read the documentation on starting Nagios.

Some other things you should check in order to resolve this error include:

1. Check the Nagios log file for messages relating to startup or status data errors.
2. Always verify configuration options using the -v command-line option before starting or restarting Nagios!
3. Make sure you've compiled the main program and the CGIs to use the same status data storage options (i.e. text file or database). If the main program is storing status data in a text file and the CGIs are trying to read status data from a database, you'll have problems.

Make sure you read the documentation on installing, configuring and running Nagios thoroughly before continuing. If all else fails, try sending a message to one of the mailing lists. More information can be found at http://www.nagios.org.


What must I do?

juraj
5th February 2008, 13:05
Did you get that "reloading configuration" part too?

Guigui2607
5th February 2008, 14:23
On dirait que Centreon n'a pas réussi à redémarrer Nagios... :roll:
Vérifie que Nagios est bien redémarré...

Peut être un problème avec sudoers :?

riki17
5th February 2008, 14:46
Yes I reload Nagios too but it doesn't work!! Last time I have had to install again Nagios (./configure - make - make install - etc..) and it work but without hosts in Monitoring index...
I don't know how to do...thanks

----------------------------------------------------------------------------------------------

J'ai relancé nagios mais ça ne marche toujours pas.C'est sans doute à cause du nouveau fichier config que j'ai généré avec l'option deplacer les fichiers.La dernière fois j'ai du réinstaller Nagios et ça a remarché mais toujours sans les hotes dans le menu Monitoring...
aidez moi svp je ne sais vraiment pas comment faire.Merci

riki17
5th February 2008, 14:49
Quand je veux redemarrer Nagios voici ce qui se passe...
When I want to restart Nagios manually the consol print that:

debian:/home/administrateur# /etc/init.d/nagios start
Starting nagios:Pas de répertoire, connexion avec HOME=/
done.

juraj
5th February 2008, 15:03
Odd, If you still have the nagios web interface available can you see the hosts there?

riki17
5th February 2008, 15:09
no when I go to Nagios Monitoring hosts index there's that :

Whoops!

Error: Could not read host and service status information!

The most common cause of this error message (especially for new users), is the fact that Nagios is not actually running. If Nagios is indeed not running, this is a normal error message. It simply indicates that the CGIs could not obtain the current status of hosts and services that are being monitored. If you've just installed things, make sure you read the documentation on starting Nagios.

Some other things you should check in order to resolve this error include:

1. Check the Nagios log file for messages relating to startup or status data errors.
2. Always verify configuration options using the -v command-line option before starting or restarting Nagios!
3. Make sure you've compiled the main program and the CGIs to use the same status data storage options (i.e. text file or database). If the main program is storing status data in a text file and the CGIs are trying to read status data from a database, you'll have problems.

Make sure you read the documentation on installing, configuring and running Nagios thoroughly before continuing. If all else fails, try sending a message to one of the mailing lists. More information can be found at http://www.nagios.org.

juraj
5th February 2008, 15:13
One second.
do you have nagios running in the first place? (ps cuax | grep nagios). what does the log (usually /usr/local/nagios/var/nagios.log) say?

riki17
5th February 2008, 15:17
Allright juraj!
I only had to stop Nagios in consol mode and then start now I've my host...
thank you for your precisous help!!
do you know if there's a possibility to see all computers of my network automatically?
Thanks

riki17
5th February 2008, 15:22
non enfait je devais juste stopper nagios avec la console et le redemarrer et ça a fonctionné.Merci en tout cas pour votre aide à toi et juraj!
Tu saurais par hasard s'il y a un moyen de voir tous les ordinateurs du réseau sans avoir besoin de les rajouter à la main?
Merci encore!

juraj
5th February 2008, 15:25
"do you know if there's a possibility to see all computers of my network automatically?"

Not really, but little surgery in the centreon code should get you there. I am usually interested to see the machines that are having problems, not all of them.

Remember that once you have nagios running, and you make some changes with hosts/services, you need to both export the nagios files and restart/reload nagios every time.

riki17
5th February 2008, 15:36
I want to see machines that are having problems too, but I must supervise 450 machines and I would know if 1 of 450 machine has a problem.That's why I would have all of machines in centreon.

For changes I know that one must restart when there are changes but I thought that centreon done it ... know I know that I must do it in the shell..
thank you for all!!

juraj
5th February 2008, 15:38
No, you don't have to do it in the shell. You just need to have nagios running in the first place, then the centreon interface is perfectly able to restart it.

Guigui2607
5th February 2008, 16:12
Nagios / Centreon n'est pas capable (ou pas pour le moment) de découvrir tout seul toutes les machines qui sont sur le réseau.
Cependant, une fois que tu les as toutes entrées dans Centreon, et que tu as correctement configuré les paramètres que tu veux surveiller pour chacune, Nagios / Centreon te remontera les infos et t'alertera si un des paramètres passe en Warning ou en Critical... :wink:

riki17
5th February 2008, 16:15
ok merci beaucoup pour les infos!
thank you for all infos!!!