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!
duplicates after "apply configuration"
-
kendallchenoweth
- Posts: 195
- Joined: Fri Sep 13, 2013 10:43 am
-
avandemore
- Posts: 1597
- Joined: Tue Sep 27, 2016 4:57 pm
Re: duplicates after "apply configuration"
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"
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!
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"
First log in to mysql:
Then run the following commands in order:
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:
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
mysql -uroot -pnagiosxiCode: Select all
use nagios;
delete from nagios_hosts where instance_id='2';
exitIf you want to get the table names for that database, just use the following command:
Code: Select all
show tables;Code: Select all
delete from nagios_services where instance_id='2';If you do want to double-check, you can just use
Code: Select all
select * from WHATEVERTABLE where instance_id='2'