duplicates after "apply configuration"

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
kendallchenoweth
Posts: 195
Joined: Fri Sep 13, 2013 10:43 am

duplicates after "apply configuration"

Post by kendallchenoweth »

I'm on Nagios XI 2014R2.0 and when I click on "Apply Configuration", I get duplicate services. The duplicates are eliminated when I delete/write/verify/restart files. This is happening on a Nagios system generated by cloning another nagios instance. How can I resolve this?

Thanks!
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: duplicates after "apply configuration"

Post by avandemore »

You should consider upgrading. Many fixes including security related are in current versions of Nagios XI.
Previous Nagios employee
kendallchenoweth
Posts: 195
Joined: Fri Sep 13, 2013 10:43 am

Re: duplicates after "apply configuration"

Post by kendallchenoweth »

We are planning an upgrade. In the meantime, since this problem isn't happening on other servers with the same version, can you still help out?

Thanks!
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: duplicates after "apply configuration"

Post by dwhitfield »

First log in to mysql:

Code: Select all

mysql -uroot -pnagiosxi
Then run the following commands in order:

Code: Select all

use nagios;
delete from nagios_hosts where instance_id='2';
exit
It's possible you will need to run the delete command on other tables in the nagios db. It's impossible to say at this point since hosts and services are tied.

If you want to get the table names for that database, just use the following command:

Code: Select all

show tables;
The obvious one after hosts is:

Code: Select all

delete from nagios_services where instance_id='2';
If that doesn't do it, we may need to get a database dump. This is almost certainly the ultimate issue, but it's possible you somehow have instance_id=3 or something like that. I can't be certain without looking at the db, but I feel confident in the commands I've given you.

If you do want to double-check, you can just use

Code: Select all

select * from WHATEVERTABLE where instance_id='2'
Locked