Nagios Core 3.5.0
Copyright (c) 2009-2011 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 03-15-2013
License: GPL
Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Processing object config directory '/usr/local/nagios/etc/static'...
Processing object config file '/usr/local/nagios/etc/static/xitemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/static/xitest.cfg'...
Processing object config file '/usr/local/nagios/etc/static/xiobjects.cfg'...
Processing object config file '/usr/local/nagios/etc/contacttemplates.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/timeperiods.cfg'...
Warning: Duplicate definition found for timeperiod 'xi_timeperiod_24x7' (config file '/usr/local/nagios/etc/timeperiods.cfg', starting on line 125)
Error: Could not add object property in file '/usr/local/nagios/etc/timeperiods.cfg' on line 126.
Error processing object config files!
***> 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.
When Write to Config File: Result
Write host configurations ...
Host configuration files successfully written!
Write service configurations ...
Service configuration files successfully written!
Configuration file: hostgroups.cfg successfully written!
Configuration file: servicegroups.cfg successfully written!
Configuration file: hosttemplates.cfg successfully written!
Configuration file: servicetemplates.cfg successfully written!
Configuration file: timeperiods.cfg successfully written!
Configuration file: commands.cfg successfully written!
Configuration file: contacts.cfg successfully written!
Configuration file: contactgroups.cfg successfully written!
Configuration file: contacttemplates.cfg successfully written!
Configuration file: servicedependencies.cfg successfully written!
Configuration file: hostdependencies.cfg successfully written!
Configuration file: serviceescalations.cfg successfully written!
Configuration file: hostescalations.cfg successfully written!
Configuration file: serviceextinfo.cfg successfully written!
Configuration file: hostextinfo.cfg successfully written!
When I Click Verify Configuration: Result
Error: Could not add object property in file '/usr/local/nagios/etc/timeperiods.cfg' on line 126.
Nagios Core 3.5.0
Copyright (c) 2009-2011 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 03-15-2013
License: GPL
Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Processing object config directory '/usr/local/nagios/etc/static'...
Processing object config file '/usr/local/nagios/etc/static/xitemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/static/xitest.cfg'...
Processing object config file '/usr/local/nagios/etc/static/xiobjects.cfg'...
Processing object config file '/usr/local/nagios/etc/contacttemplates.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/timeperiods.cfg'...
Warning: Duplicate definition found for timeperiod 'xi_timeperiod_24x7' (config file '/usr/local/nagios/etc/timeperiods.cfg', starting on line 125)
Error: Could not add object property in file '/usr/local/nagios/etc/timeperiods.cfg' on line 126.
Error processing object config files!
***> 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.
Last edited by amakorju on Tue Jul 23, 2013 2:40 am, edited 2 times in total.
You may have to use the CCM (Core Config Manager) to hunt down the config issue. Go to --> Configure --> Core Config Manager --> Tools --> Write Config Files. Click write and then verify. Post the output here in code wraps.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Write host configurations ...
Host configuration files successfully written!
Write service configurations ...
Service configuration files successfully written!
Configuration file: hostgroups.cfg successfully written!
Configuration file: servicegroups.cfg successfully written!
Configuration file: hosttemplates.cfg successfully written!
Configuration file: servicetemplates.cfg successfully written!
Configuration file: timeperiods.cfg successfully written!
Configuration file: commands.cfg successfully written!
Configuration file: contacts.cfg successfully written!
Configuration file: contactgroups.cfg successfully written!
Configuration file: contacttemplates.cfg successfully written!
Configuration file: servicedependencies.cfg successfully written!
Configuration file: hostdependencies.cfg successfully written!
Configuration file: serviceescalations.cfg successfully written!
Configuration file: hostescalations.cfg successfully written!
Configuration file: serviceextinfo.cfg successfully written!
Configuration file: hostextinfo.cfg successfully written!
verify config file
Error: Could not add object property in file '/usr/local/nagios/etc/timeperiods.cfg' on line 132.
Nagios Core 3.5.0
Copyright (c) 2009-2011 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 03-15-2013
License: GPL
Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Processing object config directory '/usr/local/nagios/etc/static'...
Processing object config file '/usr/local/nagios/etc/static/xitemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/static/xitest.cfg'...
Processing object config file '/usr/local/nagios/etc/static/xiobjects.cfg'...
Processing object config file '/usr/local/nagios/etc/contacttemplates.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/timeperiods.cfg'...
Warning: Duplicate definition found for timeperiod 'xi_timeperiod_24x7' (config file '/usr/local/nagios/etc/timeperiods.cfg', starting on line 131)
Error: Could not add object property in file '/usr/local/nagios/etc/timeperiods.cfg' on line 132.
Error processing object config files!
***> 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.
Restart Nagios
RESTART FAILED. CONFIG ERROR:
Error: Could not add object property in file '/usr/local/nagios/etc/timeperiods.cfg' on line 132.
Warning: Duplicate definition found for timeperiod 'xi_timeperiod_24x7' (config file '/usr/local/nagios/etc/timeperiods.cfg', starting on line 125)
Error: Could not add object property in file '/usr/local/nagios/etc/timeperiods.cfg' on line 126.
It seems like the "xi_timeperiod_24x7" is defined twice - once in the database, and once - in the static. I would recommend commenting out (or deleting) the "xi_timeperiod_24x7" definition in "/usr/local/nagios/etc/static/xiobjects.cfg". Save and exit, then run the Write Config Tool again to check for config errors. If there are no errors, Apply Configuration.
Hope this helps.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Verify Config File
Error: Contact 'xi_default_contact' specified in service 'Ping' for host 'AbiaHouse_Link' is not defined anywhere!
Error: Check period 'xi_timeperiod_24x7' specified for service 'Ping' on host 'AbiaHouse_Link' is not defined anywhere!
Error: Notification period 'xi_timeperiod_24x7' specified for service 'Ping' on host 'AbiaHouse_Link' is not defined anywhere!
Error: Check period 'xi_timeperiod_24x7' specified for service 'Ping' on host 'Abia_House' is not defined anywhere!
Error: Notification period 'xi_timeperiod_24x7' specified for service 'Ping' on host 'Abia_House' is not defined anywhere!
Error: Contact 'xi_default_contact' specified in service 'Ping' for host 'ICT_Operation_Printer' is not defined anywhere!
Error: Check period 'xi_timeperiod_24x7' specified for service 'Ping' on host 'ICT_Operation_Printer' is not defined anywhere!
Error: Notification period 'xi_timeperiod_24x7' specified for service 'Ping' on host 'ICT_Operation_Printer' is not defined anywhere!
Error: Contact 'xi_default_contact' specified in service 'Printer Status' for host 'ICT_Operation_Printer' is not defined anywhere!
Error: Check period 'xi_timeperiod_24x7' specified for service 'Printer Status' on host 'ICT_Operation_Printer' is not defined anywhere!
Error: Notification period 'xi_timeperiod_24x7' specified for service 'Printer Status' on host 'ICT_Operation_Printer' is not defined anywhere!
Error: Check period 'xi_timeperiod_24x7' specified for service 'Ping' on host 'Kaduna_Link' is not defined anywhere!
Error: Notification period 'xi_timeperiod_24x7' specified for service 'Ping' on host 'Kaduna_Link' is not defined anywhere!
Error: Check period 'xi_timeperiod_24x7' specified for service 'Ping' on host 'Lagos_Link' is not defined anywhere!
Error: Notification period 'xi_timeperiod_24x7' specified for service 'Ping' on host 'Lagos_Link' is not defined anywhere!
Error: Check period 'xi_timeperiod_24x7' specified for service 'HTTP' on host 'SigmaFire' is not defined anywhere!
Restart Nagios
RESTART FAILED. CONFIG ERROR:
Error: Contact 'xi_default_contact' specified in service 'Ping' for host 'AbiaHouse_Link' is not defined anywhere!
Error: Check period 'xi_timeperiod_24x7' specified for service 'Ping' on host 'AbiaHouse_Link' is not defined anywhere!
Error: Notification period 'xi_timeperiod_24x7' specified for service 'Ping' on host 'AbiaHouse_Link' is not defined anywhere!
Error: Check period 'xi_timeperiod_24x7' specified for service 'Ping' on host 'Abia_House' is not defined anywhere!
Error: Notification period 'xi_timeperiod_24x7' specified for service 'Ping' on host 'Abia_House' is not defined anywhere!
Error: Contact 'xi_default_contact' specified in service 'Ping' for host 'ICT_Operation_Printer' is not defined anywhere!
Error: Check period 'xi_timeperiod_24x7' specified for service 'Ping' on host 'ICT_Operation_Printer' is not defined anywhere!
Error: Notification period 'xi_timeperiod_24x7' specified for service 'Ping' on host 'ICT_Operation_Printer' is not defined anywhere!
Error: Contact 'xi_default_contact' specified in service 'Printer Status' for host 'ICT_Operation_Printer' is not defined anywhere!
Error: Check period 'xi_timeperiod_24x7' specified for service 'Printer Status' on host 'ICT_Operation_Printer' is not defined anywhere!
Error: Notification period 'xi_timeperiod_24x7' specified for service 'Printer Status' on host 'ICT_Operation_Printer' is not defined anywhere!
Error: Check period 'xi_timeperiod_24x7' specified for service 'Ping' on host 'Kaduna_Link' is not defined anywhere!
Error: Notification period 'xi_timeperiod_24x7' specified for service 'Ping' on host 'Kaduna_Link' is not defined anywhere!
Error: Check period 'xi_timeperiod_24x7' specified for service 'Ping' on host 'Lagos_Link' is not defined anywhere!
OK, now you are missing the xi_timeperiod_24x7 entirely and the xi_default_contact. What exactly did you change?
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
This happens when you try to edit two things related to each other without applying configuration first...
when this happens within services/hosts i delete those files from disk and re-apply configuration from within nagiosxi, this recreates all config files.
I do not know if this happens for xiobjects.cfg as well, looking at the timestamp it doesn't
# XI OBJECTS - DO NOT MODIFY!
####################################################
# CONTACTS
####################################################
define contact{
contact_name xi_default_contact
email root@localhost
alias Default Contact
host_notification_commands xi_host_notification_handler
service_notification_commands xi_service_notification_handler
host_notification_period xi_timeperiod_none
service_notification_period xi_timeperiod_none
host_notification_options n
service_notification_options n
}
####################################################
# HOST GROUPS
####################################################
####################################################
# TIMEPERIODS
####################################################
define timeperiod{
timeperiod_name xi_timeperiod_none
alias None
}
backup your file: /usr/local/nagios/etc/timeperiods.cfg like
cp /usr/local/nagios/etc/timeperiods.cfg ~/tmp/.
then remove this file
rm /usr/local/nagios/etc/timeperiods.cfg
After i try to apply configuration (which won't work), it generates a duplicate nagios.cfg (.swp), timeperiods.cfg (swp) and commands.cfg (swp) in the /usr/local/nagios/etc folder.