Page 1 of 1
After importing configurations, duplicate are found
Posted: Fri May 11, 2018 4:14 pm
by Bitflogger
Hello,
I recently imported a bunch of hosts and services into a new installation of NagiosXI.
Later, I ran the manual configuration check and found duplicates services.
It looks like I have duplicate service definitions in the services.cfg and _multiple_hosts.cfg files.
What is the procedure for getting rid of duplicates?
Thanks for your time!
Re: After importing configurations, duplicate are found
Posted: Mon May 14, 2018 11:58 am
by Bitflogger
This is an example of what is causing the duplicates.
servicetemplates.cfg
define service {
name generic-aix-service-computational
service_description a_computational
use generic-aix-service
check_command check_nrpe!computational
retry_interval 10
notification_interval 120
first_notification_delay 10
notification_options w,c,r
register 0
}
services/services.cfg
define service {
host_name turco.doit.wisc.edu
use generic-aix-service-computational
contact_groups aix-alerts
register 1
}
[ead@winston services]$ cat turco.doit.wisc.edu.cfg
define service {
host_name turco.doit.wisc.edu
use generic-aix-service-computational
contact_groups aix-alerts
register 1
}
define service {
host_name turco.doit.wisc.edu
service_description a_disk_app1
use generic-aix-service-disk
check_command check_nrpe!disk_$HOSTNAME$.app1
contact_groups aix-crit-alerts,pesa-disk-apps
register 1
}
Re: After importing configurations, duplicate are found
Posted: Mon May 14, 2018 1:30 pm
by scottwilkerson
services.cfg doesn't sound like something that came out of the CCM on apply configuration, can you verify that if you go to Configure -> CCM -> Services in the config name drop-down you have something named "serivces"
If not, the file can be moved from the services directory and then the config verified, if would be common for there to be a _multiple_hosts.cfg after an import.
Re: After importing configurations, duplicate are found
Posted: Mon May 14, 2018 5:30 pm
by Bitflogger
I do have many. My guess is that trying to import a number of files, created by the configuration prep process, without a good filter, caused some existing configuration files to get imported, leading to something recursive. The import file selection screen seems very dangerous.
Re: After importing configurations, duplicate are found
Posted: Tue May 15, 2018 12:46 am
by rkennedy
Navigate to Configure -> Core Config Manager -> Hosts OR Services -> Find the related config - from here, you'll be able to delete and clear them out. Once finished, click 'Apply Config' to update your running configuration.
Re: After importing configurations, duplicate are found
Posted: Tue May 15, 2018 8:12 am
by scottwilkerson
Bitflogger wrote:I do have many. My guess is that trying to import a number of files, created by the configuration prep process, without a good filter, caused some existing configuration files to get imported, leading to something recursive. The import file selection screen seems very dangerous.
If you go to Configure -> CCM -> Services in the config name drop-down you can only have 1 item in the drop-down named "services"
As
@rkennedy pointed out you can choose to delete the items that are duplicates, it is possible all of them are, and they were also imported into their appropriate hosts configuration.
Re: After importing configurations, duplicate are found
Posted: Tue May 15, 2018 9:27 am
by Bitflogger
I was able to delete the duplicates. Thanks for your help!
Re: After importing configurations, duplicate are found
Posted: Tue May 15, 2018 9:57 am
by scottwilkerson
Glad it is sorted!
Locking thread