Deactivated Hosts Aren't Removed from Core

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Deactivated Hosts Aren't Removed from Core

Post by scottwilkerson »

Fix has been applied to the XI 2014 TRUNK and is undergoing testing.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Hossy
Posts: 27
Joined: Fri Dec 27, 2013 12:37 pm

Re: Deactivated Hosts Aren't Removed from Core

Post by Hossy »

scottwilkerson wrote:Now I understand what you are saying.

I will add this to our internal TODO, I believe I know how we can accomplish it, but it will be a major change that will require significant testing...
Thanks, Scott. When you have it, could you give me a bug ID or some identifier to (quickly) ask about the status of the fix in the future?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Deactivated Hosts Aren't Removed from Core

Post by scottwilkerson »

I don't have a "bug ID", but it will be in 2014. However the changes were pretty straight forward, if you want I will attach what needs to be changed here to apply to a 2012 install if you would like to test it...

Install this CCM through Admin -> Manage Components
ccm.zip
unzip this file and place in /usr/local/nagiosxi/scripts
nagiosql_exportall.zip
You do not have the required permissions to view the files attached to this post.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Hossy
Posts: 27
Joined: Fri Dec 27, 2013 12:37 pm

Re: Deactivated Hosts Aren't Removed from Core

Post by Hossy »

scottwilkerson wrote:I don't have a "bug ID", but it will be in 2014. However the changes were pretty straight forward, if you want I will attach what needs to be changed here to apply to a 2012 install if you would like to test it...

Install this CCM through Admin -> Manage Components
ccm.zip
unzip this file and place in /usr/local/nagiosxi/scripts
nagiosql_exportall.zip
Is this a replacement for your earlier ccm.zip or in addition?

Is there a way to rollback the changes if it fails or doesn't fix the problem? (I haven't messed with Manage Components yet)

EDIT: We're running Nagios XI 2012R1.8
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Deactivated Hosts Aren't Removed from Core

Post by lmiltchev »

Is this a replacement for your earlier ccm.zip or in addition?
Yes, it is a replacement.
Is there a way to rollback the changes if it fails or doesn't fix the problem? (I haven't messed with Manage Components yet)
Yes. You can install the previous ccm component by going to Admin->Manage Components->Browse...->Upload Component
Be sure to check out our Knowledgebase for helpful articles and solutions!
Hossy
Posts: 27
Joined: Fri Dec 27, 2013 12:37 pm

Re: Deactivated Hosts Aren't Removed from Core

Post by Hossy »

lmiltchev wrote:Yes. You can install the previous ccm component by going to Admin->Manage Components->Browse...->Upload Component
Where do I get the current ccm? I presume there's a way to download it from XI? or is it stored on the file system somewhere?

EDIT: Under Manage Components, there's no download link for CCM like there are on others.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Deactivated Hosts Aren't Removed from Core

Post by lmiltchev »

If you installed the ccm.zip that was provided by scottwilkerson (Tue Jan 28, 2014 1:17 pm; page 2), you can re-download it and install it.

If you haven't installed it but you want to save the current ccm, you can probably zip all of the files in the "/usr/local/nagiosxi/html/includes/components/ccm" directory as "ccm.zip", and install it later if you need to.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Hossy
Posts: 27
Joined: Fri Dec 27, 2013 12:37 pm

Re: Deactivated Hosts Aren't Removed from Core

Post by Hossy »

lmiltchev wrote:If you installed the ccm.zip that was provided by scottwilkerson (Tue Jan 28, 2014 1:17 pm; page 2), you can re-download it and install it.

If you haven't installed it but you want to save the current ccm, you can probably zip all of the files in the "/usr/local/nagiosxi/html/includes/components/ccm" directory as "ccm.zip", and install it later if you need to.
Ah, ok. So the ZIP file is just a copy of the /usr/local/nagiosxi/html/includes/components/ccm directory. Sure, I just zip that up before testing the new ccm.zip. Thanks for the info!

I'm presuming the second ZIP file fixes the Apply Configuration issue (the second issue listed)?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Deactivated Hosts Aren't Removed from Core

Post by scottwilkerson »

Hossy wrote:Ah, ok. So the ZIP file is just a copy of the /usr/local/nagiosxi/html/includes/components/ccm directory. Sure, I just zip that up before testing the new ccm.zip
perfect
Hossy wrote: I'm presuming the second ZIP file fixes the Apply Configuration issue (the second issue listed)?
Correct, actually, they both do..
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Hossy
Posts: 27
Joined: Fri Dec 27, 2013 12:37 pm

Re: Deactivated Hosts Aren't Removed from Core

Post by Hossy »

scottwilkerson wrote:I don't have a "bug ID", but it will be in 2014. However the changes were pretty straight forward, if you want I will attach what needs to be changed here to apply to a 2012 install if you would like to test it...

Install this CCM through Admin -> Manage Components
ccm.zip
unzip this file and place in /usr/local/nagiosxi/scripts
nagiosql_exportall.zip
Unfortunately, this didn't fix the problem. I was still able to deactivate a host that I know would cause an invalid config. And, upon fixing the error after running Apply Configuration, the deactivated host CFG file was never deleted.

EDIT: I deactivated two hosts. One through the checkbox/list method and one through clicking on the host and unchecking the Active checkbox.
Locked