PDA

View Full Version : Probleme avec Nagios configuration file export


RoulienDeLaVegas
10th April 2009, 09:33
Bonjour,

Je viens d'installer Nagios et Centreon à l'aide d'un tuto trouvé sur le net, et j'ai un probleme lors de l'export du fichier de config de Nagios après une modification dans Centreon, voici l'erreur :


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

Reading configuration data...

Warning Duplicate definition found for timeperiod '24x7' (config file '/usr/local/centreon/filesGeneration/nagiosCFG/1/timeperiods.cfg', starting on line 30)
Error Could not add object property in file '/usr/local/centreon/filesGeneration/nagiosCFG/1/timeperiods.cfg' on line 31.

***> The name of the main configuration file looks suspicious...

Make sure you are specifying the name of the MAIN configuration file on
the command line and not the name of another configuration file. The
main configuration file is typically '/usr/local/nagios/etc/nagios.cfg'

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


Quand j'edite le fichier concerné, je vois qu'il est vide.

J'ai trouvé un topic similaire sur le forum mais j'ai du mal a le comprendre.

Merci de votre aide.

AkHeNaToN
10th April 2009, 09:51
C'est marqué en gros ton erreur:


Reading configuration data...

Warning Duplicate definition found for timeperiod '24x7' (config file '/usr/local/centreon/filesGeneration/nagiosCFG/1/timeperiods.cfg', starting on line 30)
Error Could not add object property in file '/usr/local/centreon/filesGeneration/nagiosCFG/1/timeperiods.cfg' on line 31.


tu as 2 TIMEPERIOD qui portent le nom "24x7".

Lors de la génération des fichiers, Centreon les fait contrôler par Nagios afin de s'assurer de leur conformité.

Il faut juste lire les erreurs et corriger les problèmes puis régénérer.

RoulienDeLaVegas
10th April 2009, 11:08
Merci pour ta reponse,

Je vois bien qu'en effet dans le fichier il y a 3 fois les meme periodes :



define timeperiod{
timeperiod_name 24x7
alias 24_Hours_A_Day,_7_Days_A_Week
sunday 00:00-24:00
monday 00:00-24:00
tuesday 00:00-24:00
wednesday 00:00-24:00
thursday 00:00-24:00
friday 00:00-24:00
saturday 00:00-24:00
}



Je vien d'installer Centreon et Nagios (sans rien changer à la config de base), et je ne sait pas du tout quoi modifier pour ne plus avoir ces erreurs.

Merci

AkHeNaToN
10th April 2009, 12:19
Va dans "Configucation > Users > Time periods" et supprime 24x7 s'il apparait plusieurs fois.