I have spend hours on this issue and tried to resolve by researching on the net as people mentions this seem to be very common, however I just couldn't figure it out why. Much appreciated if you could please advise.
1. Nagios 4.0.8
2. Centos 6.5 Final
3. Before first windows server host add
Go to CCM -> write config files
Code: Select all
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!
Code: Select all
Nagios Core 4.0.8
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 08-12-2014
License: GPL
Website: http://www.nagios.org
Reading configuration data...
Warning: use_embedded_perl_implicitly is deprecated and will be removed.
Warning: sleep_time is deprecated and will be removed.
Warning: p1_file is deprecated and will be removed.
Warning: external_command_buffer_slots is deprecated and will be removed. All commands are always processed upon arrival
Warning: enable_embedded_perl is deprecated and will be removed.
Warning: command_check_interval is deprecated and will be removed. Commands are always handled on arrival
Read main config file okay...
Read object config files okay...
Running pre-flight check on configuration data...
Checking objects...
Checked 8 services.
Checked 1 hosts.
Checked 2 host groups.
Checked 0 service groups.
Checked 3 contacts.
Checked 3 contact groups.
Checked 138 commands.
Checked 10 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 1 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 10 timeperiods
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
Code: Select all
Error: Failed to locate check_period 'xi_timeperiod_24x7' for host 'abtsvr01.abtgroup.com.au'!
Error: Could not register host (config file '/usr/local/nagios/etc/hosts/abtsvr01.abtgroup.com.au.cfg', starting on line 14)
Nagios Core 4.0.8
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 08-12-2014
License: GPL
Website: http://www.nagios.org
Reading configuration data...
Warning: use_embedded_perl_implicitly is deprecated and will be removed.
Warning: sleep_time is deprecated and will be removed.
Warning: p1_file is deprecated and will be removed.
Warning: external_command_buffer_slots is deprecated and will be removed. All commands are always processed upon arrival
Warning: enable_embedded_perl is deprecated and will be removed.
Warning: command_check_interval is deprecated and will be removed. Commands are always handled on arrival
Read main config file okay...
Error: Failed to locate check_period 'xi_timeperiod_24x7' for host 'abtsvr01.abtgroup.com.au'!
Error: Could not register host (config file '/usr/local/nagios/etc/hosts/abtsvr01.abtgroup.com.au.cfg', starting on line 14)
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.
/usr/local/nagios/etc/static/xiobjects.cfg
Code: Select all
# 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
}
Code: Select all
###############################################################################
#
# Timeperiod configuration file
#
# Created by: Nagios QL Version 3.0.3
# Date: 2015-05-15 10:01:42
# Version: Nagios 3.x config file
#
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios QL will overwite all manual settings during the next update
#
###############################################################################
define timeperiod {
timeperiod_name 24 x 7
alias 24 Hours A Day, 7 Days A Week
saturday 00:00-24:00
sunday 00:00-24:00
thursday 00:00-24:00
wednesday 00:00-24:00
tuesday 00:00-24:00
monday 00:00-24:00
friday 00:00-24:00
}
define timeperiod {
timeperiod_name eg 24x7_sans_holidays
alias 24x7 Sans Holidays
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
use us-holidays
}
define timeperiod {
timeperiod_name eg nagiosadmin_notification_times
alias Notification Times for nagiosadmin
tuesday 00:00-24:00
monday 00:00-24:00
wednesday 00:00-24:00
thursday 00:00-24:00
saturday 00:00-24:00
sunday 00:00-24:00
friday 00:00-24:00
}
define timeperiod {
timeperiod_name eg nightsequence
alias exclude night sequence hours, 7 Days A Week
saturday 04:00-23:30
friday 04:00-23:30
thursday 04:00-23:30
wednesday 04:00-23:30
tuesday 04:00-23:30
monday 04:00-23:30
sunday 04:00-23:30
}
define timeperiod {
timeperiod_name eg us-holidays
alias U.S. Holidays
name us-holidays
monday 1 september 00:00-00:00
july 4 00:00-00:00
thursday -1 november 00:00-00:00
january 1 00:00-00:00
december 25 00:00-00:00
}
define timeperiod {
timeperiod_name eg xi_timeperiod_24x7
alias 24x7
name xi_timeperiod_24x7
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
monday 00:00-24:00
sunday 00:00-24:00
}
define timeperiod {
timeperiod_name Never
alias No Time Is A Good Time
}
define timeperiod {
timeperiod_name Non work hours
alias Non-Work Hours
wednesday 00:00-08:30,17:30-24:00
friday 00:00-08:30,17:30-24:00
monday 00:00-08:30,17:30-24:00
thursday 00:00-08:30,17:30-24:00
tuesday 00:00-08:30,17:30-24:00
sunday 00:00-24:00
saturday 00:00-24:00
}
define timeperiod {
timeperiod_name Working hours
alias Normal Work Hours
friday 08:30-17:30
thursday 08:30-17:30
wednesday 08:30-17:30
tuesday 08:30-17:30
monday 08:30-17:30
}
###############################################################################
#
# Timeperiod configuration file
#
# END OF FILE
#
###############################################################################
Regards,
Steve