Page 1 of 1

Bulk cloning wizard fails

Posted: Mon Aug 13, 2018 10:00 am
by jenstar13
Hi
It seems the system will not let me use the bulk cloning wizard on hosts
I have a master host as a template and I use it to clone when i have multiple hosts
it's failing now with the error

Error: Invalid max_check_attempts value for host 'lvsprdvelapp01.gspt.net'
Error: Could not register host (config file '/usr/local/nagios/etc/hosts/lvsprdvelapp01.gspt.net.cfg', starting on line 16)

The thing is my template has all the needed entries

define host {
host_name aaa_redhat7_ssh_syslog_master
use xiwizard_ncpa_host
address 10.49.184.40
hostgroups Basic Linux Checks Redhat 7_rsyslogd_needs_ssh,Uptime 1
max_check_attempts 5
check_interval 5
retry_interval 1
active_checks_enabled 1
check_period xi_timeperiod_24x7
event_handler notify-host-by-email
process_perf_data 1
retain_status_information 1
contact_groups admins
notification_interval 60
notification_period xi_timeperiod_24x7
notification_options d,u,
notifications_enabled 1
icon_image ncpa.png
statusmap_image ncpa.png
_xiwizard ncpa
register 1
}


When I use the wizard, it only does a couple of lines

define host {
host_name prdvelapp01.xxxx.net
use generic-host
address 10.49.165.24
register 1
}


If i manually copy the template, and add the host by hand, everything works just fine

define host {
host_name prdvelapp01.xxxx.net
use xiwizard_ncpa_host
address 10.49.165.24
hostgroups Basic Linux Checks Redhat 7_rsyslogd_needs_ssh,Uptime 1
max_check_attempts 5
check_interval 5
retry_interval 1
active_checks_enabled 1
check_period xi_timeperiod_24x7
event_handler notify-host-by-email
process_perf_data 1
retain_status_information 1
contact_groups admins
notification_interval 60
notification_period xi_timeperiod_24x7
notification_options d,u,
notifications_enabled 1
icon_image ncpa.png
statusmap_image ncpa.png
_xiwizard ncpa
register 1
}

The problem comes from that i need to add 30 hosts for my one ticket

Re: Bulk cloning wizard fails

Posted: Mon Aug 13, 2018 11:49 am
by scottwilkerson
After consulting with the developers about the cause of this, we did come up with a cause and that is the file format changes slightly in the newer versions and need to be re-written to be parsed correctly.

Lets to the following. Remove the erroneous configs for the host/services, in the CCM.

Then

CCM -> Tools -> Config File Management
Delete Files
Write Configs
Verify Files
Restart Nagios Core

This will reset the configs

Now, the Bulk Host Import Wizard should work correctly.

Re: Bulk cloning wizard fails

Posted: Tue Aug 14, 2018 6:00 am
by jenstar13
That fixed it, thank you, you can close this

Re: Bulk cloning wizard fails

Posted: Tue Aug 14, 2018 7:34 am
by scottwilkerson
jenstar13 wrote:That fixed it, thank you, you can close this
locking