cannot disable or delete host when "exclude" dependency set

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
lucasari
Posts: 15
Joined: Tue Aug 13, 2019 4:26 am

cannot disable or delete host when "exclude" dependency set

Post by lucasari »

Hi,

I was trying to disable an host from the CCM, but it was not allowing me for it had some "dependencies".
I tried to delete it. the system allowed me, but when I tried to apply the configuration it threw some errors and had to revert to the latest snapshot.

Luckily I did remember that I did add the host in a service in order to "exclude" it. once I removed the "eclusion" dependency from the service I was then able to disable and in a second time delete the host without errors.

is that a normal behavior? if so, how can I find all the relationships that a host has that might prevent me from disabling/deleting it?

I'm running Nagios XI 5.6.13

best regards,
Luca
User avatar
jbrunkow
Posts: 441
Joined: Fri Mar 13, 2020 10:45 am

Re: cannot disable or delete host when "exclude" dependency

Post by jbrunkow »

It is normal for a host to have dependencies. It is recommended to remove all services associated with a host during removal. Are you asking if an exclusion should count as a dependency?

I can recommend several resources ( see below ) on how dependencies work in Nagios and how to remove them.

core doc = https://assets.nagios.com/downloads/nag ... ncies.html
video = https://youtu.be/WFiRAxN6eDY
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
lucasari
Posts: 15
Joined: Tue Aug 13, 2019 4:26 am

Re: cannot disable or delete host when "exclude" dependency

Post by lucasari »

I am familiar with these different dependencies and that's why we mostly use HostGroups to assign services. We organized all different services into hostgroups to easily assign the same services to multiple host at once.
One example of hostgroup could be "Windows Server OS" that automatically associates the host with the following services:
- CPU usage
- Memory usage
- Drive C usage
- Uptime
- Windows update

sometimes we need to exclude the "Windows Update" check. since it is very rare, we just add the host inside the service "Windows Update" as exclusion, in this way we don't need to move the service to a different hostgroup and risk to forget to assign it to an important host.
this is the case that was preventing me from deleting the host.
how can I easily find if an host is present in any other service like in this case? the error message when deleting can give me a clue, otherwise do I have to go thru all hostgroups and look for the host?
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: cannot disable or delete host when "exclude" dependency

Post by ssax »

This won't help if it's already deleted but if you go to Admin > Core Config Manager > Hosts and click the little blue circle with an "i" in it to the far right of the host, it will show you the relationships.

After talking with development on this I've submitted a bug report:

Code: Select all

NEW TASK created - Nagios XI Bug Report: XI - Deleting host that is in escalation/dependency causes an invalid configuration
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: cannot disable or delete host when "exclude" dependency

Post by ssax »

This only failed for me with escalations, not dependencies, but I submitted it anyways.
lucasari
Posts: 15
Joined: Tue Aug 13, 2019 4:26 am

Re: cannot disable or delete host when "exclude" dependency

Post by lucasari »

thanks! that did help.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: cannot disable or delete host when "exclude" dependency

Post by scottwilkerson »

lucasari wrote:thanks! that did help.
Bug report files, locking thread
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked