PDA

View Full Version : Cannot Export Configuration Files


tfc
05-26-2008, 10:44 AM
Hi,
I Install entreon beta 2.0-SVN.
When crate a user and try to export I get an error like this:
Nagios 3.0.2
Copyright (c) 1999-2008 Ethan Galstad (http://www.nagios.org)
Last Modified: 05-19-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 32)
Error Could not add object property in file '/usr/local/centreon/filesGeneration/nagiosCFG/1/timeperiods.cfg' on line 33.

***> 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.




Running configuration check... CONFIG ERROR! Restart aborted. Check your Nagios configuration.


What should I do

WAtt
05-26-2008, 11:21 AM
I think you have a problem on your Nagios config (in centreon)

Juste read a warning message and fix it.


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

***> 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...

tfc
05-26-2008, 11:48 AM
I comment these raws. But, After I clicked export button, I get same error. Then I go to /usr/local/nagios/etc/timeperiods.cfg file and I see that there is no comment!!! And modified date is now.
Then I comment out both timeperiod file under centreon fileGeneration and nagios etc folder. No change.
I control host configuration in centreon and I see that there are 3 times 24x7, workhours, nonworkhours and none.
I mean:

...
...
# '24x7' timeperiod definition 1
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
}

# '24x7' timeperiod definition 2
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
}

# '24x7' timeperiod definition 3
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
}
...
...

this is same for other timeperiod definitions

tfc
05-26-2008, 01:51 PM
Now i solve this problem. Every run instalaltion script add row to timeperiod raw into dayabase. I delete these unnecessary rows. Now it works i think