Page 1 of 1

removed hosts are still displayed on home !!

Posted: Tue Jan 09, 2018 5:34 am
by mmhamdan
Dears ,

Please I need your gaudiness in solving this matter. we have tried many solution but with no luck.
Recently we have decided to remove all hosts on our Nagios Xi so we run restore_defaults.sh script and it worked.

Now from Core Config Manger there is no hosts But in Home page we are still seeing removed hosts

the following solution didn't work!!

* Configure -> Core Config Manager, then on the left under Tools click Write Config Files. Then click Delete, then Write, then Verify and Restart

*Checked /usr/local/nagios/etc/hosts and host is not there

*/usr/local/nagiosxi/scripts/reconfigure_nagios.sh | tail -20

output for Verifying config file:
Nagios Core 4.2.4
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 12-07-2016
License: GPL

Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Read object config files okay...

Running pre-flight check on configuration data...

Checking objects...
Checked 14 services.
Checked 1 hosts.
Checked 1 host groups.
Checked 0 service groups.
Checked 2 contacts.
Checked 2 contact groups.
Checked 124 commands.
Checked 8 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 1 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 8 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 0
Total Errors: 0

Things look okay - No serious problems were detected during the pre-flight check

Expected free space after clearing nagios data and hosts

Posted: Tue Jan 09, 2018 8:10 am
by mmhamdan
Hello everyone hope you are doing fine . i have inquire about storage space, we were having around 8000 hosts on our Nagios we decide to remove all hosts and clear all the exists data so we used default restore script and found that hosts are gone but our storage didn't increase.

My question is there another action i should do since i don't need any of my old files, all i want is to be looked like new one.

Re: removed hosts are still displayed on home !!

Posted: Tue Jan 09, 2018 10:34 am
by npolovenko
Hello, @mmhamdan. I'll answer your first question. I think your ndo2db deamon might be down. Click on the Admin menu, and you'll see the system dashboard with green status check marks. I suspect you may have a red check mark next to the Database Backend. Can you confirm that?
If that is the case, here are the steps you should take:
1. Stop Nagios with service nagios stop
2. Run this command:

Code: Select all

mv /usr/local/nagios/var/ndo2db.lock /usr/local/nagios/var/ndo2db.lock.bak
And this command:

Code: Select all

mv /usr/local/nagios/var/ndo.sock /usr/local/nagios/var/ndo.sock.bak
3. Start Nagios:

Code: Select all

service nagios start
4. Start ndo2db:

Code: Select all

service ndo2db start

Re: removed hosts are still displayed on home !!

Posted: Tue Jan 09, 2018 10:46 am
by npolovenko
Hello everyone hope you are doing fine . i have inquire about storage space, we were having around 8000 hosts on our Nagios we decide to remove all hosts and clear all the exists data so we used default restore script and found that hosts are gone but our storage didn't increase.

My question is there another action i should do since i don't need any of my old files, all i want is to be looked like new one.
Although this question may be related to the original one, I'd ask you to open a new thread for it. That will make threads more structured and it will be easier for other users to navigate around our forum.
Thank you.

Re: removed hosts are still displayed on home !!

Posted: Wed Jan 10, 2018 3:07 am
by mmhamdan
npolovenko wrote:Hello, @mmhamdan. I'll answer your first question. I think your ndo2db deamon might be down. Click on the Admin menu, and you'll see the system dashboard with green status check marks. I suspect you may have a red check mark next to the Database Backend. Can you confirm that?
If that is the case, here are the steps you should take:
1. Stop Nagios with service nagios stop
2. Run this command:

Code: Select all

mv /usr/local/nagios/var/ndo2db.lock /usr/local/nagios/var/ndo2db.lock.bak
And this command:

Code: Select all

mv /usr/local/nagios/var/ndo.sock /usr/local/nagios/var/ndo.sock.bak
3. Start Nagios:

Code: Select all

service nagios start
4. Start ndo2db:

Code: Select all

service ndo2db start

Thank you very much for your instructions it worked for me . now we don't see any host nether in home nor in report page at hosts drop list.

But i wonder why Database Backend still checked with red color

Re: removed hosts are still displayed on home !!

Posted: Wed Jan 10, 2018 3:11 am
by mmhamdan
npolovenko wrote:
Hello everyone hope you are doing fine . i have inquire about storage space, we were having around 8000 hosts on our Nagios we decide to remove all hosts and clear all the exists data so we used default restore script and found that hosts are gone but our storage didn't increase.

My question is there another action i should do since i don't need any of my old files, all i want is to be looked like new one.
Although this question may be related to the original one, I'd ask you to open a new thread for it. That will make threads more structured and it will be easier for other users to navigate around our forum.
Thank you.

Sorry for conflict i thought that i was writing a new topic i don't know how both topics end up together :lol:
i will open a new topic for this matter since i still facing the issue,

Re: removed hosts are still displayed on home !!

Posted: Wed Jan 10, 2018 10:08 am
by npolovenko
@mmhamdan, Great! It may take a few minutes for the red checkmark to disappear. You could double check whether the ndo2db is working with the following command:

Code: Select all

service ndo2db status
And you should see an output similar to this:

Code: Select all

ndo2db (pid 4169) is running...