Importing Config Files From Nagios Core into Nagios XI

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
jvanmeter
Posts: 21
Joined: Fri Apr 03, 2015 9:10 am

Importing Config Files From Nagios Core into Nagios XI

Post by jvanmeter »

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?
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Importing Config Files From Nagios Core into Nagios XI

Post by jolson »

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.
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
jvanmeter
Posts: 21
Joined: Fri Apr 03, 2015 9:10 am

Re: Importing Config Files From Nagios Core into Nagios XI

Post by jvanmeter »

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?
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Importing Config Files From Nagios Core into Nagios XI

Post by eloyd »

The filenames can be changed in your nagios.cfg file. Look for "cfg_file" and "cfg_dir" entries in that file:

Code: Select all

egrep "^cfg_(file|dir)" /usr/local/nagios/etc/nagios.cfg
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.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Importing Config Files From Nagios Core into Nagios XI

Post by tgriep »

jvanmeter,

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!
Locked