Migrating Nagios Core to XI
-
notnagiospro
- Posts: 11
- Joined: Fri Jan 27, 2017 4:50 am
Migrating Nagios Core to XI
Hello everyone,
i hope to get some help here with the problem of the migration i have got at the moment.
Situation:
I have got a Nagios Core running with several hosts and checks, now i want to get everything from the Nagios Core to the Nagios XI without having to rebuild everything.
I looked up a manual which describes the way how to import the .cfg's. So i prepped the .cfg's from the old server with the "xiprepimport.php" and it worked just fine. After that i wanted to import the new .cfg's from the cfgprep folder. I importet them in the order that's recommended from Nagios. Everything is fine until the point "services".
In my understanding the xiprepimport.php takes the service files and creates another file which is called "_multiple_hosts.cfg". The service files are empty so i importet the _multiple_hosts.cfg. But after that i cannot verify the files anymore because i get this error:
Error: Template 'generic-service_perf' specified in service definition could not be not found (config file '/usr/local/nagios/etc/services/_multiple_hosts.cfg', starting on line 176)
Error: Could not expand master service(s) (config file '/usr/local/nagios/etc/servicedependencies.cfg', starting at line 927)
Error: Could not expand dependent service(s) (at config file '/usr/local/nagios/etc/servicedependencies.cfg', starting on line 927)
The Line 176 from the _multiple_hosts.cfg looks like this:
define service {
host_name "hostname"
service_description check_watchdog_flows_3803
use generic-service
display_name Check Predecessors for 3803
servicegroups nprod_checks
check_command check_watchdog_flows!mpx01_prod!3803
max_check_attempts 1
check_interval 60
check_period watchdog_flows
notification_interval 0
contacts "contact"
contact_groups "group"
register 1
}
The line 927 from the servicedependencies.cfg starts there:
define servicedependency {
# config_name Import 1487150290.1606
dependent_host_name "hostname"
host_name "hostname"
inherits_parent 0
execution_failure_criteria c
notification_failure_criteria c
}
But all the other entries looks the same so i don't think thats the point of failure.
If i now deactivate all the service dependencies in the XI GUI i only got 1 error left:
Error: Template 'generic-service_perf' specified in service definition could not be not found (config file '/usr/local/nagios/etc/services/_multiple_hosts.cfg', starting on line 176)
But that can't be the right way to get rid of the other error..
I can see the services in the CCM but i cannot apply the configuration. But there are also multiple checks with the same name (screenshot attached).
I don't really know what to do with this.
I tried to import Plugins before i import all the .cfg's but this doesn't work either.
Thanks in advance for any idea of solving this.
i hope to get some help here with the problem of the migration i have got at the moment.
Situation:
I have got a Nagios Core running with several hosts and checks, now i want to get everything from the Nagios Core to the Nagios XI without having to rebuild everything.
I looked up a manual which describes the way how to import the .cfg's. So i prepped the .cfg's from the old server with the "xiprepimport.php" and it worked just fine. After that i wanted to import the new .cfg's from the cfgprep folder. I importet them in the order that's recommended from Nagios. Everything is fine until the point "services".
In my understanding the xiprepimport.php takes the service files and creates another file which is called "_multiple_hosts.cfg". The service files are empty so i importet the _multiple_hosts.cfg. But after that i cannot verify the files anymore because i get this error:
Error: Template 'generic-service_perf' specified in service definition could not be not found (config file '/usr/local/nagios/etc/services/_multiple_hosts.cfg', starting on line 176)
Error: Could not expand master service(s) (config file '/usr/local/nagios/etc/servicedependencies.cfg', starting at line 927)
Error: Could not expand dependent service(s) (at config file '/usr/local/nagios/etc/servicedependencies.cfg', starting on line 927)
The Line 176 from the _multiple_hosts.cfg looks like this:
define service {
host_name "hostname"
service_description check_watchdog_flows_3803
use generic-service
display_name Check Predecessors for 3803
servicegroups nprod_checks
check_command check_watchdog_flows!mpx01_prod!3803
max_check_attempts 1
check_interval 60
check_period watchdog_flows
notification_interval 0
contacts "contact"
contact_groups "group"
register 1
}
The line 927 from the servicedependencies.cfg starts there:
define servicedependency {
# config_name Import 1487150290.1606
dependent_host_name "hostname"
host_name "hostname"
inherits_parent 0
execution_failure_criteria c
notification_failure_criteria c
}
But all the other entries looks the same so i don't think thats the point of failure.
If i now deactivate all the service dependencies in the XI GUI i only got 1 error left:
Error: Template 'generic-service_perf' specified in service definition could not be not found (config file '/usr/local/nagios/etc/services/_multiple_hosts.cfg', starting on line 176)
But that can't be the right way to get rid of the other error..
I can see the services in the CCM but i cannot apply the configuration. But there are also multiple checks with the same name (screenshot attached).
I don't really know what to do with this.
I tried to import Plugins before i import all the .cfg's but this doesn't work either.
Thanks in advance for any idea of solving this.
You do not have the required permissions to view the files attached to this post.
Re: Migrating Nagios Core to XI
I know you mentioned you used the file to import, but did you follow these documents?
- https://assets.nagios.com/downloads/nag ... p-Tool.pdf
- https://assets.nagios.com/downloads/nag ... ios-XI.pdf
The second one, mentions you'll want to import your templates BEFORE any actual services, otherwise you'll see errors like this. Was generic-service_perf a template from your past setup? Does it exist in XI?
- https://assets.nagios.com/downloads/nag ... p-Tool.pdf
- https://assets.nagios.com/downloads/nag ... ios-XI.pdf
The second one, mentions you'll want to import your templates BEFORE any actual services, otherwise you'll see errors like this. Was generic-service_perf a template from your past setup? Does it exist in XI?
Former Nagios Employee
-
notnagiospro
- Posts: 11
- Joined: Fri Jan 27, 2017 4:50 am
Re: Migrating Nagios Core to XI
Thank you for your answer,
yes i followed this two PDF's step by step. I also importet the templates before the services/hosts etc.
But i have not edit the servicetemplates.cfg before i importet it. Do i have to manually write the generic-service_perf into this file?
I thought that the xiprep tool will do those things.
yes i followed this two PDF's step by step. I also importet the templates before the services/hosts etc.
But i have not edit the servicetemplates.cfg before i importet it. Do i have to manually write the generic-service_perf into this file?
I thought that the xiprep tool will do those things.
-
notnagiospro
- Posts: 11
- Joined: Fri Jan 27, 2017 4:50 am
Re: Migrating Nagios Core to XI
Here's the error part from the _multiple_hosts.cfg :
define service {
use generic-service_perf
host_name "hostname"
service_description check_iq_dbspace_usage
display_name Check DB Space
check_command check_iq_dbspace_usage!mpx01_dev!iq_main%!85!90
max_check_attempts 1
check_interval 20
check_period office
notification_options c,r
notification_interval 0
contacts bioperator
servicegroups ndev_checks
}
but a few lines above there is another entry, without any error (and these two have the same hostname):
define service {
use generic-service_perf
host_name "hostname"
service_description check_iq_dbspace_usage
display_name Check DB Space
check_command check_iq_dbspace_usage!mpx01_dev!iq_main%!85!90
max_check_attempts 1
check_interval 20
check_period office
notification_options c,r
notification_interval 0
contacts bioperator
servicegroups ndev_checks
}
define service {
use generic-service_perf
host_name "hostname"
service_description check_iq_dbspace_usage
display_name Check DB Space
check_command check_iq_dbspace_usage!mpx01_dev!iq_main%!85!90
max_check_attempts 1
check_interval 20
check_period office
notification_options c,r
notification_interval 0
contacts bioperator
servicegroups ndev_checks
}
but a few lines above there is another entry, without any error (and these two have the same hostname):
define service {
use generic-service_perf
host_name "hostname"
service_description check_iq_dbspace_usage
display_name Check DB Space
check_command check_iq_dbspace_usage!mpx01_dev!iq_main%!85!90
max_check_attempts 1
check_interval 20
check_period office
notification_options c,r
notification_interval 0
contacts bioperator
servicegroups ndev_checks
}
-
notnagiospro
- Posts: 11
- Joined: Fri Jan 27, 2017 4:50 am
Re: Migrating Nagios Core to XI
Oh i got it now. I had to activate the service temaplate because it was deactivated after the import.
Now it works fine, but i still have to deactivate all service dependencies, otherwise i can't apply my configuration, any suggestions to this point?
Now it works fine, but i still have to deactivate all service dependencies, otherwise i can't apply my configuration, any suggestions to this point?
Re: Migrating Nagios Core to XI
Can you share the specific error message that Nagios XI is churning out? You can usually view it like so:
If you could PM a system profile, that would also be helpful. From the Nagios XI GUI, you can gather a system profile via Admin -> System Profile -> Download Profile.
If you could PM a system profile, that would also be helpful. From the Nagios XI GUI, you can gather a system profile via Admin -> System Profile -> Download Profile.
You do not have the required permissions to view the files attached to this post.
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
Re: Migrating Nagios Core to XI
I would guess that one of the hosts / services that are used in your service entries didn't get imported so that is probably the reason they have to be deactivated.
Check each one or recreate them after everything else has been imported and fix them as needed.
Check each one or recreate them after everything else has been imported and fix them as needed.
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
notnagiospro
- Posts: 11
- Joined: Fri Jan 27, 2017 4:50 am
Re: Migrating Nagios Core to XI
I have attached the error code and the profile.zip
I have another error now too. I have checks for some Sybase Servers. But it seems that there is no Sybase driver installed at the moment. The error Code is also attached. Is there a package from Nagios for Sybase?
I only find very old instructions for this..
Thank you in advance!
I have another error now too. I have checks for some Sybase Servers. But it seems that there is no Sybase driver installed at the moment. The error Code is also attached. Is there a package from Nagios for Sybase?
I only find very old instructions for this..
Thank you in advance!
You do not have the required permissions to view the files attached to this post.
Re: Migrating Nagios Core to XI
The plugin you are using needs the DBD Sybase perl module installed for it to run.
Login as root to the server and run the following to install it.
Try that and see in this fixes the issue for you.
Login as root to the server and run the following to install it.
Code: Select all
yum install perl-DBD-SybaseBe sure to check out our Knowledgebase for helpful articles and solutions!
-
notnagiospro
- Posts: 11
- Joined: Fri Jan 27, 2017 4:50 am
Re: Migrating Nagios Core to XI
I already tried to install this package, but he could not find any package with that name so i think i have to add a repository before i can install that package.
I will look it up tomorrow at work, if you have any idea of which repository i have to add please let me know, would be very helpfull!
Thank you in advance!
I will look it up tomorrow at work, if you have any idea of which repository i have to add please let me know, would be very helpfull!
Thank you in advance!