Core to XI Migration problems !!!!

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
uhiadmin
Posts: 85
Joined: Sat Jan 15, 2011 9:01 am

Core to XI Migration problems !!!!

Post by uhiadmin »

Hi there, iam attepmting to migrate just over 1500 cisco routers from nagios core to nagios XI that we just purchased, i used all the migration documents
step by step using the second option of importig the config files.

migrating_from_nagios_core_to_nagios_xi.pdf
using_the_xi_config_import_prep_tool.pdf
importing_config_files_into_XI.pdf


the problem i have is that at the end when i do the config verification i get this error


Error: Could not find any hostgroup matching 'Cisco2800' (config file '/usr/local/nagios/etc/hosts/767000.cfg', starting on line 14)
Error processing object config files!


Cisco2800 is suppose to be a host group, and it actually shows up in the Host Groups list.

At first i thought it could be this host or hostgroup or something like that but when i delete that host it still fails on other hosts that are members
of other host groups

ex:
Error: Could not find any hostgroup matching 'Cisco881' (config file '/usr/local/nagios/etc/hosts/715058.cfg', starting on line 14)
Error processing object config files!

it appears that they all fail on the same line 14

here is what my XI server is running on

1.new install of Centos 5.5
2. 64bit
3. manual installation
4. gnome is installed

Any help would be much appreciated

thanks
tonyyarusso
Posts: 1128
Joined: Wed Mar 03, 2010 12:38 pm
Location: St. Paul, MN, USA
Contact:

Re: Core to XI Migration problems !!!!

Post by tonyyarusso »

What do your hostgroup definitions files look like? Can you see any obvious parsing errors there?
Tony Yarusso
Technical Services
___
TIES
Web: http://ties.k12.mn.us/
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Core to XI Migration problems !!!!

Post by mguthrie »

Make sure you import your hostgroups.cfg file before importing your hosts (use the order that's recommended on the import page). Verify that the hostgroup has been created successfully in the Core Config Manager. Also check to see if you have any apparent duplicate entries for that hostgroup in the Core Config Manager.
uhiadmin
Posts: 85
Joined: Sat Jan 15, 2011 9:01 am

Re: Core to XI Migration problems !!!!

Post by uhiadmin »

these are my host group defs


###############################################################################
###############################################################################
#
# HOST GROUP DEFINITIONS
#
###############################################################################
###############################################################################

# Create a new hostgroup for switches

define hostgroup{
hostgroup_name switches ; The name of the hostgroup
alias Network Switches ; Long name of the group
}
define hostgroup{
hostgroup_name Cisco881 ; The name of the hostgroup
alias Center Routers ; Long name of the group
}
define hostgroup{
hostgroup_name CiscoASA ; The name of the hostgroup
alias Network Firewalls ; Long name of the group
}
define hostgroup{
hostgroup_name Cisco2800 ; The name of the hostgroup
alias MCO Routers ; Long name of the group
}

this is my list of host groups in the config manager
NCCM.GIF
when i imported all the config files the host groups and hosts definitions were all in the same config file, thats the way that the prep tool outputted them probably because my core configuration was one big config file.
You do not have the required permissions to view the files attached to this post.
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Core to XI Migration problems !!!!

Post by mguthrie »

Did you run the import prep tool on your script?

You need to run the imports in the order that the Core Config Manager specifies, otherwise your groups and dependencies will not transfer correctly. I'm not sure if the prep tool separates configs into separate files, but if it doesn't, you may need to figure out a way to separate those into different files. A script would come in handy for that.
uhiadmin
Posts: 85
Joined: Sat Jan 15, 2011 9:01 am

Re: Core to XI Migration problems !!!!

Post by uhiadmin »

yes i ran the prep tool on the one big config file i had for the core server and it created 1500 service
definition config files and one host file that has both hosts and host groups in it. should i just start from
the begining of the import proccess and seperate the host group defs and host defs into there own config file and
then reimport ? and if so is there an easy way i would go about removing all the hosts and services that are already
in the core config manager as so to start with a basically a fresh nagiosXI install
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Core to XI Migration problems !!!!

Post by mguthrie »

I've got some code that I could probably modify if you needed a script to separate your configs. Just let me know.

The easiest way I know of deleting all configs is to go into the Core Config Manager->Config Manager Admin->Config Manager settings, and crank the displayed results up to about 500. Select all of your services and delete them first, then go and delete all of your hosts, groups, etc. At the moment there isn't a cleaner way than that I'm afraid.
tonyyarusso
Posts: 1128
Joined: Wed Mar 03, 2010 12:38 pm
Location: St. Paul, MN, USA
Contact:

Re: Core to XI Migration problems !!!!

Post by tonyyarusso »

That would probably be best, yes.

As for the database restore, I've attached a dump of the database from a freshly installed system. You should be able to just import this in place an end up with a fresh copy.

Code: Select all

[root@localhost ~]#  bzip2 -d blog.bak.sql.bz2
[root@localhost ~]#  mysql -u root -p nagiosql <fresh-nagiosql.sql
Enter password: (enter your mysql password - "nagiosxi")
[root@localhost ~]#
Note that you will need to run the "Write config files" steps after doing this - you'll find that under the Admin area.
You do not have the required permissions to view the files attached to this post.
Tony Yarusso
Technical Services
___
TIES
Web: http://ties.k12.mn.us/
uhiadmin
Posts: 85
Joined: Sat Jan 15, 2011 9:01 am

Re: Core to XI Migration problems !!!!

Post by uhiadmin »

thank you for your reply's i will try these this afternoon and let you guys know the outcome
uhiadmin
Posts: 85
Joined: Sat Jan 15, 2011 9:01 am

Re: Core to XI Migration problems !!!!

Post by uhiadmin »

This worked flawlessly. thank you guys for your help!!! as mguthrie stated you have to import the host groups first even though the import page says to import the hosts first.

taken from the import page

commands -> timeperiods -> contacttemplates -> contacts -> contactgroups -> hosttemplates -> hosts -> hostgroups -> servicetemplates -> services -> servicegroups
Locked