Hi! Need your help on how to remove host and its services that is not existing anymore in Nagios XI.
I have used VMware ESX / vSphere / vCenter wizard to add this VM server and have decided to remove them afterwards.
I have deleted its services and also the host name in CCM but it still visible in my list of Hosts and Services.
Had already checked the Write Config Tool and there are No errors found.
Rebooteing the machine was also done but it still in there.
I have also tried to stop nagios and delete host and services in /usr/local/nagios/etc/hosts and /usr/local/nagios/etc/services.
But when i run Nagios again, it's telling me that "Starting nagios:CONFIG ERROR! Start aborted. Check your Nagios configuration."
Please help.
Cannot manually delete hosts and services config files
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Cannot manually delete hosts and services config files
Looks like you have a case of the Ghost Hosts, take a look at this page here and follow the instructions:
http://support.nagios.com/wiki/index.ph ... t_Hosts.29
http://support.nagios.com/wiki/index.ph ... t_Hosts.29
Re: Cannot manually delete hosts and services config files
I have seen the error.
There were two cfg service files created for 1 host. The name of the other service file was different. I did not notice it yesterday.
Anyway, I was able to manually delete them and had restart nagios properly.
Thanks!
There were two cfg service files created for 1 host. The name of the other service file was different. I did not notice it yesterday.
Anyway, I was able to manually delete them and had restart nagios properly.
Thanks!
Re: Cannot manually delete hosts and services config files
Great! If this ever happens again, the best way to deal with it is to get a date sorted listing of the following directories:
If any cfg files are substantially older than the rest, those are most likely ghost files that were not removed correctly after an apply configuration and most likely should be removed.
Code: Select all
ls -lat /usr/local/nagios/etc/hosts
ls -lat /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.
"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.
Re: Cannot manually delete hosts and services config files
I'll keep that in mind. Thank you very much.
Re: Cannot manually delete hosts and services config files
Gonna go ahead and lock this post. If you have any other questions, feel free to open up a new thread.
Former Nagios employee