Unable to remove service/host
Unable to remove service/host
There is an "orphan" service and host that is showing up in my hosts and services displays on the main screen, but when I go into Core Config I don't see either. I try going into them and deleting them but I'm getting a message about Unique ID not found. Any pointers on how to get this removed?
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Unable to remove service/host
When you run the write config tool, do you get any errors?:
CCM > Tools > Write Configs Tool.
Additionally, are you able to see the .cfg files for these hosts/services in:
CCM > Tools > Write Configs Tool.
Additionally, are you able to see the .cfg files for these hosts/services in:
Code: Select all
/usr/local/nagios/etc/"services/hosts"Re: Unable to remove service/host
I see the two .cfg files in the host config directory. I tried removing by hand and applying the config but got an error.
Here is what I get trying to delete....
192.168.3.18
Could not find a unique id for this host
Host cannot be deleted using this method
One or more errors were detected that prevent the host from being deleted.
Possible causes include...
The host is associated with other hosts, services, or objects that need to be deleted first
The host is maintained in a static or external configuration file
To resolve this issue...
Use the Nagios Core Configuration Manager to delete the host - or -
Manually delete the host definition from the appropriate external configuration file
Here is what I get trying to delete....
192.168.3.18
Could not find a unique id for this host
Host cannot be deleted using this method
One or more errors were detected that prevent the host from being deleted.
Possible causes include...
The host is associated with other hosts, services, or objects that need to be deleted first
The host is maintained in a static or external configuration file
To resolve this issue...
Use the Nagios Core Configuration Manager to delete the host - or -
Manually delete the host definition from the appropriate external configuration file
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Unable to remove service/host
As I just responded to you in the other thread you need to use the Core Config Manager for this.
Re: Unable to remove service/host
The problem is, it doesn't show up under the CCM. There are actually two entries for 192.168.3.18. One is named the IP address, and the other is named based on the host name. When I show the list of hosts on the monitor screen it shows one named "192.168.3.18" and the other named "Host1". When I go into CCM and search for 192.168.3.18, it only shows "Host1". Ergo, I can't remove it in CCM. Strange....
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Unable to remove service/host
Are these the aliases or the actual definition names? You may be seeing them switched around due to a misconfiguration, I'd verify this first otherwise you could be seeing a ghost host:
http://support.nagios.com/wiki/index.ph ... t_Hosts.29
http://support.nagios.com/wiki/index.ph ... t_Hosts.29
Re: Unable to remove service/host
That did it. There were orphaned .cfg files. Deleting them and restarting cleared everything up.