Hi! I have an environment running NagiosXI 2012R1.8. I set up a new server with CentOS 6.5 and installed Nagios XI 2014R1.3. The plan was to migrate the 2012 configurations into 2014. The environment is a decent size with 500+ hosts and 5000+ services being monitored.
I was able to bring over the hosts and users OK. Most of the services came over OK but a few hundred of them failed with the error:
"Error: Service has no hosts and/or service_description..."
Checking the config files that are causing the error, they do have a service_description. But instead of a host_name they have a hostgroup_name.
Checking the hosts and host groups, they are all defined correctly.
Is there a way to import these service configs and have them honor the hosts defined in the host group associated with the hostgroup_name specified in the service definition? Example configs attached.
Thanks,
MJ
Problems Importing 2012r1.8 Service Configs into 2012R1.3
Problems Importing 2012r1.8 Service Configs into 2012R1.3
You do not have the required permissions to view the files attached to this post.
Re: Problems Importing 2012r1.8 Service Configs into 2012R1.
Adding an update:
I filtered through all of my service configs manually and found the offending ones. The configs that had definitions for "hostgroup_name" were indeed processed correctly.
The trick was removing the offending configs that were already brought into Nagios. I went through the Core Config Manager and deleted each one that was causing errors to allow the ones that were correct to be processed.
So now I only have a handful of service configs that don't have host_name or hostgroup_name defined.
Is it possible to at least get those into the system without throwing an error while applying the configuration?
Thanks,
MJ
I filtered through all of my service configs manually and found the offending ones. The configs that had definitions for "hostgroup_name" were indeed processed correctly.
The trick was removing the offending configs that were already brought into Nagios. I went through the Core Config Manager and deleted each one that was causing errors to allow the ones that were correct to be processed.
So now I only have a handful of service configs that don't have host_name or hostgroup_name defined.
Is it possible to at least get those into the system without throwing an error while applying the configuration?
Thanks,
MJ
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: Problems Importing 2012r1.8 Service Configs into 2012R1.
Importing configs is a bit tricky. Any object that gets imported needs to have any and all dependencies defined in the system already, such as hostgroups or templates, and be correct in terms of config completeness, or it will error out. I would say start with one of the offending configs, attempt to reimport it, if it does import, write out the configs to flat files with the write configs tool in CCM. Once that is done, compare the flat file outputted by XI with your original. They should be virtually identical, if not please post the configs back here and we can take a look at what might be the issue.
Also, I would suggest editing your previous post instead of double posting. We don't use the order the are listed in the forums, but the last post time, so double posting will only reset that counter and delay our response possibly. Just a friendly heads up.
Also, I would suggest editing your previous post instead of double posting. We don't use the order the are listed in the forums, but the last post time, so double posting will only reset that counter and delay our response possibly. Just a friendly heads up.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Re: Problems Importing 2012r1.8 Service Configs into 2012R1.
Thanks for the info.
As it is, I ended up importing all the configs in batches, fishing out the offending ones.
Cheers.
As it is, I ended up importing all the configs in batches, fishing out the offending ones.
Cheers.
Re: Problems Importing 2012r1.8 Service Configs into 2012R1.
Are we safe to close this thread up then?
Former Nagios employee