Nagios XI 2014 - Auto Deletes Stopped Working

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
mrochelle
Posts: 238
Joined: Fri May 04, 2012 11:20 am
Location: Heart of America

Nagios XI 2014 - Auto Deletes Stopped Working

Post by mrochelle »

After upgrading several of my Nagios servers to Nagios XI 2014R1.1, I noticed that my automated host management was no longer performing the auto deletes. The adds appear to be working fine. I have manually walked through the steps using the commands:
/usr/local/nagiosxi/scripts/nagiosql_delete_service.php --config=<config_name>
/usr/local/nagiosxi/scripts/nagiosql_delete_host.php --host=<config_name>
/usr/local/nagiosxi/scripts/reconfigure_nagios.sh
and things appear to be ok. I'm attaching the output for reference. You thoughts are appreciated,
Marcus
Automated_Host_Management.txt
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Nagios XI 2014 - Auto Deletes Stopped Working

Post by lmiltchev »

I was able to recreate the issue. It is possible that this is caused by the changes we made in apply configuration logic.
We will have to do some more digging into this. We will let you know when we have a possible fix/workaround.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
mrochelle
Posts: 238
Joined: Fri May 04, 2012 11:20 am
Location: Heart of America

Re: Nagios XI 2014 - Auto Deletes Stopped Working

Post by mrochelle »

NP, Thanks for the quick follow up.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Nagios XI 2014 - Auto Deletes Stopped Working

Post by lmiltchev »

Follow the stops, outlined here:

http://support.nagios.com/forum/viewtop ... 12#p102512

This will fix your issue with the Automated Host Management (deleting hosts).
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
mrochelle
Posts: 238
Joined: Fri May 04, 2012 11:20 am
Location: Heart of America

Re: Nagios XI 2014 - Auto Deletes Stopped Working

Post by mrochelle »

I followed the indicated steps in the reference post. Downloaded and unzip both indicated zips in appropriate locations and no change with the problem.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Nagios XI 2014 - Auto Deletes Stopped Working

Post by lmiltchev »

We tested the patches numerous times and they worked in our environment... Can you show us the commands that you are running from the command line, in order to add hosts and services, along with the output of them?
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
mrochelle
Posts: 238
Joined: Fri May 04, 2012 11:20 am
Location: Heart of America

Re: Nagios XI 2014 - Auto Deletes Stopped Working

Post by mrochelle »

Attached you will find a response file which I have included the directory listings for the updates for your review to be sure I have them install and the commands and output. Let me know what you find. :geek:
The commands are in order of execution:
./nagiosql_delete_service.php --config=KC_1806 >> AHC_response.txt
./nagiosql_delete_service.php --config=KC_1808 >> AHC_response.txt
./nagiosql_delete_host.php --host=KC_1806 >> AHC_response.txt
./nagiosql_delete_host.php --host=KC_1808 >> AHC_response.txt
./reconfigure_nagios.sh >> AHC_response.txt
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Nagios XI 2014 - Auto Deletes Stopped Working

Post by lmiltchev »

I wonder if the "nagiosql_delete_service.php" script actually deleted the services on this host from the database... as you have:
Unable to delete host KC_1806. Host has dependent relationships
Let's find out if this is indeed what's failing. Add a brand new test host with some services as you normally would. Next, try to remove the services on this host from the database:

Code: Select all

./nagiosql_delete_service.php --config=<config name>
Do not apply configuraiton (do not run "./reconfigure_nagios.sh"). Go to the CCM and check to see if the services have been deleted.



One more thing... When you create your hosts + services from the CLI, do you use the SAME config name as the host name? For example:

1. Placing the hostA.cfg file in the "/usr/local/nagios/etc/import/" directory:
define host{
host_name hostA
address 127.0.0.1
use xiwizard_generic_host
}
define service{
host_name hostA
service_description Ping
use xiwizard_website_ping_service
}
2. Running "./reconfigure_nagios.sh".

3. Deleting the service.
./nagiosql_delete_service.php --config=hostA
4. Deleting the host.
./nagiosql_delete_host.php --host=hostA
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
mrochelle
Posts: 238
Joined: Fri May 04, 2012 11:20 am
Location: Heart of America

Re: Nagios XI 2014 - Auto Deletes Stopped Working

Post by mrochelle »

Yes, when I create the service, the config name is the same as the host name. Also, keep in mind, this automation worked prior to the NagiosXI 2014 upgrade. I performed the test you requested and the ./nagiosql_delete_service.php --config=<config name> is not working. The test service on the test host I created was not deleted.
I also created and attempted the same with a host only and no service. The ./nagiosql_delete_host.php --host=KC_TEST2 did not remove the host. So it appears neither command is working for me. :(
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Nagios XI 2014 - Auto Deletes Stopped Working

Post by abrist »

mrochelle: Could you open a ticket by sending an email to [email protected]? I would like to set up a remote to look into and solve this issue.
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.
Locked