Warning: Duplicate definition found for service (HELP))

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Technology_Vacation
Posts: 22
Joined: Thu Mar 21, 2013 9:07 am

Re: Warning: Duplicate definition found for service (HELP))

Post by Technology_Vacation »

Lets say there are 100 servers..

50 of them are showing the duplication error.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Warning: Duplicate definition found for service (HELP))

Post by abrist »

Update to 2012r2.2 first. Then you will want to write out your config files. Afterwards you will then want to check the dates on your host and service config files. Once you have upgraded, go to Configure --> Tools --> Write Config Files --> click "write". Then run the two listings below and post the output here in code wraps.

Code: Select all

ls -la /usr/local/nagios/etc/hosts
ls -la /usr/local/nagios/etc/services
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Technology_Vacation
Posts: 22
Joined: Thu Mar 21, 2013 9:07 am

Re: Warning: Duplicate definition found for service (HELP))

Post by Technology_Vacation »

Thanks for the info, However can you explain to me the reason that i need to upgrade?

Is this a bug in the code?, I currently have?

Will upgrading fix this problem?, please advise when time permits..
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Warning: Duplicate definition found for service (HELP))

Post by abrist »

There was a bug with cases in an earlier version. The upgrade will fix the bug, but not resolve the problem. We most likely will have to remove the old configs by hand, that is what the listing were for, so we can see which files do not get a time stamp update after "write".
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Technology_Vacation
Posts: 22
Joined: Thu Mar 21, 2013 9:07 am

Re: Warning: Duplicate definition found for service (HELP))

Post by Technology_Vacation »

Sorry i dont follow?

Are you saying I must upgrade, because there is a possible bug with the current code i'm running which relates to this problem? and in order to fix this duplicate issue, a upgrade is needed?

Or are you saying that either way I have to upgrade from the current code, remove the old configs by hand in the services directory and then do a "Write" which in return will fix this problem?

Again correct me if i'm wrong!!
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Warning: Duplicate definition found for service (HELP))

Post by abrist »

You could attempt to remove the duplicates by hand before you try the upgrade as not everybody was affected by this bug. To do so:
Go to --> Configure --> Core Config Manager --> Tools --> "Write". Once they are written out, check the configs files for files whose time stamp did not update:

Code: Select all

ls -la /usr/local/nagios/etc/hosts
ls -la /usr/local/nagios/etc/services
If the time stamp of both duplicates of each file match, then you may want to do a database repair and then an upgrade.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Technology_Vacation
Posts: 22
Joined: Thu Mar 21, 2013 9:07 am

Re: Warning: Duplicate definition found for service (HELP))

Post by Technology_Vacation »

I did remove the duplicates once already under (SERVICES) there were no duplicates under (HOSTS)

Then after I went to add another device and apply configurations and did a sanity check, duplicates were showing again in the SERVICES Folder.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Warning: Duplicate definition found for service (HELP))

Post by slansing »

They will be shown unless you remove them, then use the write config tool, ans THEN apply configuration.

CCM > Tools > Write Config Files. Click the buttons from top to bottom.
Technology_Vacation
Posts: 22
Joined: Thu Mar 21, 2013 9:07 am

Re: Warning: Duplicate definition found for service (HELP))

Post by Technology_Vacation »

I manually removed them then followed the steps you listed below..

and the duplicates still show up..
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Warning: Duplicate definition found for service (HELP))

Post by slansing »

Are they visible in the CCM as well? Try removing them from the CCM, then from the /etc/services directory, and write config. They may be being populated by the DB.
Locked