Bulk Host Cloning and Import doesn't work
Posted: Fri Jul 27, 2018 10:47 pm
Dear Support,
We are having issue with the "Bulk Host Cloning and Import" feature, it looks like the host config file generated by Nagios is incomplete. Please see below for the details.
Please advise.
Thanks
***************************************************************************************************************
Nagios Core 4.4.1
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 2018-06-25
License: GPL
Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Error: Invalid max_check_attempts value for host 'mysalt.xxx.com'
Error: Could not register host (config file '/usr/local/nagios/etc/hosts/mysalt.xxx.com.cfg', starting on line 16)
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 definitions. 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.
***************************************************************************************************************
Incomplete host config file:
###############################################################################
#
# Hosts configuration file
#
# Created by: Nagios CCM 2.7.0
# Date: 2018-07-27 20:25:20
# Version: Nagios Core 4.x
#
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios CCM will overwrite all manual settings during the next update if you
# would like to edit files manually, place them in the 'static' directory or
# import your configs into the CCM by placing them in the 'import' directory.
#
###############################################################################
define host {
host_name mysalt.xxx.com
use generic-host
address mysalt.xxx.com
register 1
}
###############################################################################
#
# Hosts configuration file
#
# END OF FILE
#
###############################################################################
Correct host config file looks like this:
###############################################################################
#
# Host configuration file
#
# Created by: Nagios Core Config Manager 2.6.5
# Date: 2017-03-16 15:44:57
# Version: Nagios 3.x config file
#
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios CCM will overwrite all manual settings during the next update if you
# would like to edit files manually, place them in the 'static' directory or
# import your configs into the CCM by placing them in the 'import' directory.
#
###############################################################################
define host {
host_name app10.xxx.com
use xiwizard_linuxserver_host
address app10.xxx.com
max_check_attempts 5
check_interval 5
retry_interval 1
check_period 24x7
contact_groups admins
notification_interval 60
notification_period 24x7
notifications_enabled 1
icon_image centos.png
statusmap_image centos.png
register 1
}
###############################################################################
#
# Host configuration file
#
# END OF FILE
#
###############################################################################
We are having issue with the "Bulk Host Cloning and Import" feature, it looks like the host config file generated by Nagios is incomplete. Please see below for the details.
Please advise.
Thanks
***************************************************************************************************************
Nagios Core 4.4.1
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 2018-06-25
License: GPL
Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Error: Invalid max_check_attempts value for host 'mysalt.xxx.com'
Error: Could not register host (config file '/usr/local/nagios/etc/hosts/mysalt.xxx.com.cfg', starting on line 16)
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 definitions. 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.
***************************************************************************************************************
Incomplete host config file:
###############################################################################
#
# Hosts configuration file
#
# Created by: Nagios CCM 2.7.0
# Date: 2018-07-27 20:25:20
# Version: Nagios Core 4.x
#
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios CCM will overwrite all manual settings during the next update if you
# would like to edit files manually, place them in the 'static' directory or
# import your configs into the CCM by placing them in the 'import' directory.
#
###############################################################################
define host {
host_name mysalt.xxx.com
use generic-host
address mysalt.xxx.com
register 1
}
###############################################################################
#
# Hosts configuration file
#
# END OF FILE
#
###############################################################################
Correct host config file looks like this:
###############################################################################
#
# Host configuration file
#
# Created by: Nagios Core Config Manager 2.6.5
# Date: 2017-03-16 15:44:57
# Version: Nagios 3.x config file
#
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios CCM will overwrite all manual settings during the next update if you
# would like to edit files manually, place them in the 'static' directory or
# import your configs into the CCM by placing them in the 'import' directory.
#
###############################################################################
define host {
host_name app10.xxx.com
use xiwizard_linuxserver_host
address app10.xxx.com
max_check_attempts 5
check_interval 5
retry_interval 1
check_period 24x7
contact_groups admins
notification_interval 60
notification_period 24x7
notifications_enabled 1
icon_image centos.png
statusmap_image centos.png
register 1
}
###############################################################################
#
# Host configuration file
#
# END OF FILE
#
###############################################################################