Configuration Import not working

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
morabanc
Posts: 199
Joined: Tue Jul 10, 2012 8:14 am

Configuration Import not working

Post by morabanc »

Hello,

We're trying to import a config, to a new nagios xi, but despite it seems it works fine, nothing is imported to the ccm. We had some permissions problems at the beginning of the installation, but now it seems is solved. The system is red hat linux 64, ,we're using a proxy and DB is configured remotely in another server. There any known problem related with this?

Regards.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Configuration Import not working

Post by tmcdonald »

What version of XI are you using? Is there a specific guide you are using to do the import? If so, please link it.
Former Nagios employee
morabanc
Posts: 199
Joined: Tue Jul 10, 2012 8:14 am

Re: Configuration Import not working

Post by morabanc »

The version is 2014 R2.0. We're not using a guide for the import, we're just using the configuration import tool from CCM. Following the steps explained in the tool.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Configuration Import not working

Post by slansing »

We should edit that tool with a few notes, firstly, you will want to run your configs through the prep tool:

http://assets.nagios.com/downloads/nagi ... p-Tool.pdf

That way, they can be formatted properly for an XI server, then you will want to follow:

http://assets.nagios.com/downloads/nagi ... ios-XI.pdf

Which essentially walks you through the web interface config import process. I'm putting in a feature request for these notes to be added.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Configuration Import not working

Post by lmiltchev »

What kind of config are you importing? Is this a Nagios Core of Nagios XI config? If it is a Nagios Core config, you will need to run the cfgprep tool first. Read our documentation on the cfgprep tool here:

http://assets.nagios.com/downloads/nagi ... p-Tool.pdf

If this is a XI config, it *should have worked*. After importing the config, did you run the Write Config Tool for verify configuration (check for errors)?

CCM->Tools->Write Config Files->Write->Verify
Be sure to check out our Knowledgebase for helpful articles and solutions!
morabanc
Posts: 199
Joined: Tue Jul 10, 2012 8:14 am

Re: Configuration Import not working

Post by morabanc »

Ok, I'm going to run the preconfig tool and I will inform you with the results.

Thanks.
morabanc
Posts: 199
Joined: Tue Jul 10, 2012 8:14 am

Re: Configuration Import not working

Post by morabanc »

Hello,

It has not worked... I tried to import the original files on test environment and it worked, so I think the problem is not the cfg files. For this installation we use symbolic links. it could affect?
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Configuration Import not working

Post by slansing »

Well, I can tell you that it is expecting the true file, not a sym linked one, where do you have the symlinks in place? If they don't deal directly with the configuration files I don't think that would be a huge issue. Did you make sure to remove the un-prepped files and then run the prep tool? So you were not trying to import all of them together? Are you importing them in the proper order? What is the exact error/issue you are seeing when trying to import?
morabanc
Posts: 199
Joined: Tue Jul 10, 2012 8:14 am

Re: Configuration Import not working

Post by morabanc »

Ok, It was just an idea, it is the only difference between this installation and other ones that I made.

Actually there are no errors when we make the importation. And we are following the proper order. To discard problems when import more than one file. We have tried to import just one, with the same results.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Configuration Import not working

Post by lmiltchev »

OK, let's do a simple test. Make a "cfgprep" directory if haven't done so.

Code: Select all

mkdir /usr/local/nagios/etc/cfgprep
Copy the commands config to cfgprep:

Code: Select all

cp /usr/local/nagios/etc/commands.cfg /usr/local/nagios/etc/cfgprep/
Open the "/usr/local/nagios/etc/cfgprep/commands.cfg" in a text editor and make some mods. For example, you can create a copy and an existent command and give the "new" command a unique name.

Example:

Code: Select all

define command {
       command_name                             check-host-alive
       command_line                             $USER1$/check_icmp -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 5
}

define command {
       command_name                             TEST-IMPORT
       command_line                             $USER1$/check_icmp -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 5
}
Save and exit.

Next, import the "/usr/local/nagios/etc/cfgprep/commands.cfg" file from the GUI:

CCM->Tools->Import Config Files

Select the "/usr/local/nagios/etc/cfgprep/commands.cfg" file, keep the "Overwrite Database"=checked, and click on "Import".

Next go to the CCM->Commands and search for " TEST-IMPORT". Was the command added?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked