Page 2 of 3
Re: Changing Nagios XI Server IP
Posted: Tue Oct 08, 2013 2:48 pm
by toleolu
The old Nagios is Version 1.1.
Is there a trick to converting or importing the services from v1.1 to NagiosXI? Everything else came across and is correct, just no services.
Re: Changing Nagios XI Server IP
Posted: Tue Oct 08, 2013 4:05 pm
by slansing
When you imported your configuration files did you see the services.cfg listed in the configurations nagios was reading in? Did it show any errors?
Re: Changing Nagios XI Server IP
Posted: Tue Oct 08, 2013 9:04 pm
by toleolu
Think I might have found the problem.
I have the original services.cfg file in /usr/local/nagios/etc/cfgprep/orig and I have a services.cfg in /usr/local/nagios/etc/cfgprep, only probably is, it's empty, nothing in that files. The one in /cfgprep/orig is correct, but the one in /cfgprep contains no data.
I don't have a services.cfg in usr/local/nagios/etc, but I do have servicedependencies, serviceescalations, serviceextinfo, servicegroups, and servicetemplates.cfg's in there. But they all just appear to be the default NagiosXI files.
Can I re run the import script just with the services.cfg file?
Re: Changing Nagios XI Server IP
Posted: Wed Oct 09, 2013 9:35 am
by slansing
That shouldddddd be okay, I would follow the steps again with just your services.cfg file. Do you by chance know what is in there? Can you verify its not just localhost services, and it in fact has all of your services?
Re: Changing Nagios XI Server IP
Posted: Wed Oct 09, 2013 12:26 pm
by toleolu
Here's a sample of what's in the current services.cfg file on the live v 1.1 system. This is how it appears in cfgprep/orig on the new Nagios XI system as well.
define service{
use generic-service ; Name of service template to use
host_name Svr3MCTX1
service_description Disk Usage C:
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 5
retry_check_interval 1
contact_groups nt-admins
notification_interval 0
check_command check_nt_disk!C!90!95
}
That's one service for one particular host. In the case of the servers of course there would be an additional service defined to check the D: drive, E: drive etc. etc.
I'll delete the empty services.cfg file that's in cfgprep on the new Nagios XI server and try importing it again. I'll let you know what I get on that.
Mahalo
Re: Changing Nagios XI Server IP
Posted: Wed Oct 09, 2013 12:36 pm
by lmiltchev
I'll delete the empty services.cfg file that's in cfgprep on the new Nagios XI server and try importing it again. I'll let you know what I get on that.
Sure, let us know if you run into more issues.
Re: Changing Nagios XI Server IP
Posted: Wed Oct 09, 2013 2:45 pm
by toleolu
Shoot, same thing.
I deleted services.cfg from cfgprep, ran the import on just the services.cfg file in cfgprep/orig with no errors, but the new services.cfg in cfgprep is blank as well.
Is there anything in here that might be causing a problem with the import:
################################################################################
# Sample object config file for Nagios
#
# Read the documentation for more information on this configuration file. I've
# provided some comments here, but things may not be so clear without further
# explanation, so make sure to read the HTML documentation!
#
# Last Modified: 09-17-2002
#
################################################################################
################################################################################
# SERVICE DEFINITIONS
#
# SYNTAX:
#
################################################################################
# Generic service definition template
define service{
name generic-service ; The 'name' of this service template, referenced in other service definitions
active_checks_enabled 1 ; Active service checks are enabled
passive_checks_enabled 1 ; Passive service checks are enabled/accepted
parallelize_check 1 ; Active service checks should be parallelized (disabling this can lead to major performance problems)
obsess_over_service 1 ; We should obsess over this service (if necessary)
check_freshness 0 ; Default is to NOT check service 'freshness'
notifications_enabled 1 ; Service notifications are enabled
notification_period 24x7
# notification_options c,r
notification_options n
event_handler_enabled 1 ; Service event handler is enabled
flap_detection_enabled 1 ; Flap detection is enabled
process_perf_data 1 ; Process performance data
retain_status_information 1 ; Retain status information across program restarts
retain_nonstatus_information 1 ; Retain non-status information across program restarts
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
}
# Service definition
Everything after this is actual service definitions. Any ideas why this isn't importing properly? Could I have missed something on the sequence of the imported files when I intially imported them
Thanks
Thanks
Re: Changing Nagios XI Server IP
Posted: Thu Oct 10, 2013 12:01 pm
by toleolu
I tried importing everything from scratch again, and I still come up with same problem of services.cfg showing up as an empty file in /cfgprep. Does anyone have a solution for this?
I have to be honest, it's going to be a little difficult given the tight budgets with the state these days to justify the cost of Nagios XI if we're going to have to build everything from scratch.
Thanks for all your help.
Re: Changing Nagios XI Server IP
Posted: Thu Oct 10, 2013 12:11 pm
by slansing
Can you copy one of your actual definitions from that file and share it here? If it has sensitive information please block it out. I'm curious to see if there is something strange with how they are defined, a general rule of thumb for importing is configurations older than those created with nagios 3.2 can cause issues.
Are you receiving errors when running the prep tool on your services.cfg, be sure you are running the command when you are in the directory with the services.cfg file, and be sure this .cfg file has all of your services in it. "for example":
Code: Select all
php /usr/local/nagiosxi/tools/xiprepimport.php orig/services.cfg
After you run this, "your original services.cfg file will be completely empty" you should see additional .cfg files in the "orig" directory, they should go along the lines of "thisisahostname.cfg" Those files are now your services as each service in nagios XI has it's own cfg.
Re: Changing Nagios XI Server IP
Posted: Thu Oct 10, 2013 12:16 pm
by toleolu
There's an actual copy of one of my definition files a couple of posts above.
I get no erros when I run the xiprepimport