Page 1 of 1
duplicates after "apply configuration"
Posted: Tue May 30, 2017 11:46 am
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!
Re: duplicates after "apply configuration"
Posted: Tue May 30, 2017 12:34 pm
by avandemore
You should consider upgrading. Many fixes including security related are in current versions of Nagios XI.
Re: duplicates after "apply configuration"
Posted: Tue May 30, 2017 2:32 pm
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!
Re: duplicates after "apply configuration"
Posted: Tue May 30, 2017 3:19 pm
by dwhitfield
First log in to mysql:
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:
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'