Page 5 of 6

Re: Deactivated Hosts Aren't Removed from Core

Posted: Mon Feb 03, 2014 1:43 pm
by Hossy
lmiltchev wrote:I would really recommend upgrading your Nagios XI instance. We have many bug fixes and added features after 2012R1.8. Please, read the change log here:

http://assets.nagios.com/downloads/nagi ... S-2012.TXT
I will discuss this internally. Upgrading our instance is a little bit involved, hence my question about testing on 2012R1.8.

Re: Deactivated Hosts Aren't Removed from Core

Posted: Mon Feb 03, 2014 3:39 pm
by lmiltchev
I will discuss this internally. Upgrading our instance is a little bit involved, hence my question about testing on 2012R1.8.
I did a fresh install of 2012R1.8. Tried to deactivate and delete localhost. In both cases I was warned about dependent relationships...
example1.PNG
example2.PNG

Re: Deactivated Hosts Aren't Removed from Core

Posted: Mon Feb 03, 2014 3:45 pm
by Hossy
lmiltchev wrote:
I will discuss this internally. Upgrading our instance is a little bit involved, hence my question about testing on 2012R1.8.
I did a fresh install of 2012R1.8. Tried to deactivate and delete localhost. In both cases I was warned about dependent relationships...
example1.PNG
example2.PNG
Thanks, lmiltchev. Can you recap the steps you performed to make sure I didn't miss something? Please use as much detail as possible.

Re: Deactivated Hosts Aren't Removed from Core

Posted: Mon Feb 03, 2014 3:51 pm
by abrist
lmiltchev wrote: In both cases I was warned about dependent relationships...
This is WAI, as the services for localhost depend on it. If you remove the host before the services (in this case) you will receive the error.

Re: Deactivated Hosts Aren't Removed from Core

Posted: Wed Feb 05, 2014 9:55 am
by lmiltchev
Thanks, lmiltchev. Can you recap the steps you performed to make sure I didn't miss something? Please use as much detail as possible.
1. I downloaded the 2012R1.8 tarball to my "/tmp" directory, un-tared it, cd-ed to "/tmp/nagiosxi" directory and ran "./fullinstall".

2. I logged in the CCM->Hosts, clicked on the "Yes Active" button (trying to deactivate localhost), and saw the error message about dependent relationships (my first screenshot).

3. I clicked on the "Delete" action button (trying to delete localhost), and saw another error message about dependent relationships (my second screenshot).

Re: Deactivated Hosts Aren't Removed from Core

Posted: Wed Feb 05, 2014 12:35 pm
by Hossy
lmiltchev wrote:
Thanks, lmiltchev. Can you recap the steps you performed to make sure I didn't miss something? Please use as much detail as possible.
1. I downloaded the 2012R1.8 tarball to my "/tmp" directory, un-tared it, cd-ed to "/tmp/nagiosxi" directory and ran "./fullinstall".

2. I logged in the CCM->Hosts, clicked on the "Yes Active" button (trying to deactivate localhost), and saw the error message about dependent relationships (my first screenshot).

3. I clicked on the "Delete" action button (trying to delete localhost), and saw another error message about dependent relationships (my second screenshot).
So you didn't apply the patch from Steve?

Re: Deactivated Hosts Aren't Removed from Core

Posted: Wed Feb 05, 2014 1:02 pm
by lmiltchev
I applied it to a newer version of XI and it worked as expected. I didn't apply it on Nagios XI 2012R1.8, but this didn't seem to make a difference... I am not 100% sure what the issue is. I tried to follow the steps that you outlined:
Here's what happens:
1. Deactivate a host (and possibly another type of change) that causes the "Verify" step to fail.
2. Apply Configuration (this fails).
3. CCM reverts the config files to their previous state, but leaves the database settings unchanged.
4. User fixes the error.
5. Apply Configuration (this succeeds this time).
During my tests:
1. Deactivate a host (and possibly another type of change) that causes the "Verify" step to fail.
I tried to deactivate or delete localhost, but I would get the "Item localhost cannot be disabled because it has dependent relationships" error. "Verify" didn't fail for me, since the host was NOT deactivated.
2. Apply Configuration (this fails).
Apply Configuration didn't fail either.

Re: Deactivated Hosts Aren't Removed from Core

Posted: Wed Feb 05, 2014 1:06 pm
by Hossy
lmiltchev wrote:I applied it to a newer version of XI and it worked as expected. I didn't apply it on Nagios XI 2012R1.8, but this didn't seem to make a difference... I am not 100% sure what the issue is. I tried to follow the steps that you outlined:
Is there an option to enable/disable the checking of dependencies before delete/deactivate operations?

Re: Deactivated Hosts Aren't Removed from Core

Posted: Wed Feb 05, 2014 1:58 pm
by slansing
No, not that I know of, the reason being is the dependencies are made in the database as well, and it won't let you break that chain because of this.

Re: Deactivated Hosts Aren't Removed from Core

Posted: Wed Feb 05, 2014 4:39 pm
by Hossy
slansing wrote:No, not that I know of, the reason being is the dependencies are made in the database as well, and it won't let you break that chain because of this.
slansing: There can't be any dependencies (at least in the form of an enforced relationship) because my instance currently allows me to deactivate/delete and break the config.

We are currently upgrading to 2012R2.8 and will test again when that is complete.