Page 1 of 1
Importing single host cfg
Posted: Tue Apr 14, 2015 2:27 pm
by OptimusB
I am testing some scripting we will be doing and have created the following host configuration. I ran the prep tool and imported it according to documentation. (I have done these in the past with services and it works just fine...) For some reason, when I import file and apply configuration in XI, the host just does not show up. Am I missing something?
Code: Select all
define host {
host_name server
address server
parents parentdevice
check_command check-host-alive!!!!!!!!
max_check_attempts 2
check_interval 15
retry_interval 5
check_period xi_timeperiod_24x7
contact_groups Contact group
register 1
}
Re: Importing single host cfg
Posted: Tue Apr 14, 2015 3:21 pm
by lmiltchev
Go to the CCM and search for this host there. It is possible that it was added but it's been set as "inactive" because of an issue, i.e. something missing from the directives - parent, contact group, etc. This seems like a pretty simply config - you shouldn't be having any issues.
Re: Importing single host cfg
Posted: Tue Apr 14, 2015 3:29 pm
by OptimusB
I searched for it but could not find anything. Perhaps I will simply the host cfg further just to make sure that it wasn't a typo or invalid parent/group like you said.
Re: Importing single host cfg
Posted: Tue Apr 14, 2015 4:13 pm
by OptimusB
I found the issue. The format of the cfg file is UTF-8 which does not work. However if I set it to UTF-8 without BOM, it imports fine.... Not sure if that can be relaxed in future releases.
Re: Importing single host cfg
Posted: Tue Apr 14, 2015 4:32 pm
by jdalrymple
I'm glad you found that out. I copied and pasted from the forum into a terminal and other than having to create the proper parent and hostgroup it imported fine.
So ... would you like us to put a feature request in? I won't lie, that one will be seen as pretty low priority, but I can put it in. Also - good job on troubleshooting it
OK to lock and mark solved?
Re: Importing single host cfg
Posted: Tue Apr 14, 2015 4:34 pm
by OptimusB
If you can that would be great. Cause I am actually generating scripts on a PC and moving the CFG over means I have to convert to correct format before it imports properly. Seems like a good idea to support different encoding of the config.
Thanks and this can be locked.