I copied the etc directory and sub directories from my currect nagios servers to usr/local/nagios/etc/cfgprep/orig on my nagios xi server. Next I started to run the below commands.
php /usr/local/nagiosxi/tools/xiprepimport.php orig/commands.cfg
php /usr/local/nagiosxi/tools/xiprepimport.php orig/contacts.cfg
php /usr/local/nagiosxi/tools/xiprepimport.php orig/dependencies.cfg
php /usr/local/nagiosxi/tools/xiprepimport.php orig/hostgroups.cfg
php /usr/local/nagiosxi/tools/xiprepimport.php orig/hosts.cfg
php /usr/local/nagiosxi/tools/xiprepimport.php orig/servicegroups.cfg
php /usr/local/nagiosxi/tools/xiprepimport.php orig/services.cfg
php /usr/local/nagiosxi/tools/xiprepimport.php orig/templates.cfg
php /usr/local/nagiosxi/tools/xiprepimport.php orig/timeperiods.cfg
I noticed that I did not have the following files dependencies.cfg, hosts.cfg, services.cfg, with the other files I had cp'ed from my old nagios server. I ssh'ed onto my old nagios server and as root ran "find / -name hosts.cfg" no file was found, that was the same for dependencies and servers. Is it possible to import the cfg files from a nagios 3.2.3 server into nagios xi? Is there something different I need to do?
Importing Config Files From Nagios Core into Nagios XI
Re: Importing Config Files From Nagios Core into Nagios XI
It's no problem if your configuration filenames are different than those stated in the PDF instructions.
Have you taken a look at this document? https://assets.nagios.com/downloads/nag ... ios-XI.pdf
Let us know if you have any questions.
Have you taken a look at this document? https://assets.nagios.com/downloads/nag ... ios-XI.pdf
Let us know if you have any questions.
Re: Importing Config Files From Nagios Core into Nagios XI
yes but with the hosts.cfg and servers.cfg file missing, how would the import know what servers or services to monitor? Would it be defined in another cfg file?
Re: Importing Config Files From Nagios Core into Nagios XI
The filenames can be changed in your nagios.cfg file. Look for "cfg_file" and "cfg_dir" entries in that file:
Replace the path with the path of your actual nagios.cfg file. You will want to import every file specifically mentioned, plus every .cfg file in the cfg_dir, if one is specified.
Code: Select all
egrep "^cfg_(file|dir)" /usr/local/nagios/etc/nagios.cfg
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
Re: Importing Config Files From Nagios Core into Nagios XI
jvanmeter,
Did eloyd's post help you out in finding your host and service config files?
Did eloyd's post help you out in finding your host and service config files?
Be sure to check out our Knowledgebase for helpful articles and solutions!