Page 2 of 2

Re: Duplicate entries when running reconfigure

Posted: Wed Sep 19, 2018 10:27 pm
by ericcl9p
to answer your last question first, right, the linux_template.cfg file I originally attached is the file that gets put into the import dir. A similar file is for windows, with just the disk check different for C: instead of /dev/sda.

Still unsure of why the dupes are happening after that?

We used templates in our previous nagios core setup, and they most likely got migrated/imported in the XI deployment we have. The guy that did the migration to XI is no longer here, and I'm not sure of the steps he took, unfortunately.


If we can setup service templates so we do not need to define the same services in each host import, then that sounds like a great way to go.

Thanks
-Eric

Re: Duplicate entries when running reconfigure

Posted: Thu Sep 20, 2018 12:22 pm
by lmiltchev
Warnings are not like errors - they won't cause your configuration to fail. You still need to clean them up but this is going to require some "manual labor" on your part. Grab the names of the duplicates from the output you showed us, and search for them in the Core Config Manager. Once you find the services that are not used - delete them in the CCM. You can always check to see if there are more warnings by going to the CCM > Tools > Config File Management > Write Configs > Verify Files.

If you are unsure of how to delete services under the CCM, please review our KB article on using the CCM for service management here: https://support.nagios.com/kb/article/n ... t-539.html.

The article also covers using the service templates - something that you mentioned you wanted to do.

Note: If you are still not able to figure out how to clean up these warning messages, you could open a new support ticket via our support center here:

https://support.nagios.com/tickets/

We can remove a few of the warnings during a remote session to show you how it is done, so that you would know what to do.

Hope this helps. Thank you!

Re: Duplicate entries when running reconfigure

Posted: Thu Sep 20, 2018 12:56 pm
by ericcl9p
Thanks @lmiltchev

I was able to remove the duplicate services, as I stated in my reply on the 18th.

Since it turned out that it was our import files, and not actual nagios templates that contained the 'register 1', we're still trying to figure out how the duplicates appeared.

They haven't reappears since we cleaned them up. is there a log we could look at which could indicate what caused them?

Thanks again,
-Eric

Re: Duplicate entries when running reconfigure

Posted: Thu Sep 20, 2018 1:28 pm
by scottwilkerson
I don't really recall seeing the duplicates, however if this was migrated, it is possible that there was something in the import process that added the duplicate entries, depending on how it was done.

Re: Duplicate entries when running reconfigure

Posted: Fri Sep 21, 2018 8:38 am
by ericcl9p
thanks @scottwilkerson

the duplicates were only in hosts that were added through the import automation, no migrated hosts had duplicates. an example would be in the USA1401VM04254.cfg services file in the profile.zip that was attached earlier.


we realize the duplicate entries do not cause issues, but we're just trying to figure out how they were created. The audit log shows that there were no changes made through the UI until we removed the duplicates.

This is the import automation process we are currently using:
-use the 'import template' file linux.cfg I attached previously, and replace 'Hostname' and 'Address' with the new host values (similar file for windows)
-put the modified file in the import dir as <hostname>.cfg
-run reconfigure_nagios script

thanks again,
-Eric

Re: Duplicate entries when running reconfigure

Posted: Fri Sep 21, 2018 10:41 am
by lmiltchev
This is the import automation process we are currently using:
-use the 'import template' file linux.cfg I attached previously, and replace 'Hostname' and 'Address' with the new host values (similar file for windows)
-put the modified file in the import dir as <hostname>.cfg
-run reconfigure_nagios script
This process is solid - you shouldn't have any issues with duplicates if done right. I did several imports, using a template similar to yours, and didn't have any issues whatsoever.

Do you have any further questions?

Re: Duplicate entries when running reconfigure

Posted: Fri Sep 21, 2018 10:52 am
by ericcl9p
@lmiltchev

I guess we're good on the duplicates at this point.


We do have some questions about setting up common service parameters that can be used by each host, but also overridden if needed on some hosts. We'll open a separate ticket for that, if needed, after doing some research.


Thanks for everyone's help
-Eric

Re: Duplicate entries when running reconfigure

Posted: Fri Sep 21, 2018 11:09 am
by lmiltchev
Sounds good, Eric. I am closing this post. If you have any further questions, start a new thread.