Migrating Nagios Core to XI
Posted: Wed Feb 15, 2017 4:31 am
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.