Nagios XI Deadpool can't delete a server and services

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
emartine
Posts: 660
Joined: Thu Dec 29, 2011 10:47 am

Nagios XI Deadpool can't delete a server and services

Post by emartine »

We are getting a slew of emails from the deadpool setting that we created and are trying to figure out why we were getting so many notifications. Seems like the server that we asked to be deleted is still there. Any idea why?

############

Deleted Hosts
===
The following hosts were deleted from the monitoring configuration because they remained in a problem state longer than the stage 2 deadpool threshold.

fakeserver


Access Nagios XI at:

<URL removed>

#############
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Nagios XI Deadpool can't delete a server and services

Post by ssax »

What version of XI are you running? You can grab the version from the bottom left hand side of the web interface.

Additionally, did you follow this guide?

https://assets.nagios.com/downloads/nag ... ios-XI.pdf

Please PM me a copy of your profile as well, you can download it from Admin > System Profile > Download Profile.

I want to make sure you don't have too many kernel message queues or duplicate nagios processes or something else from the logs.

Please send me your full /usr/local/nagiosxi/var/deadpool.log as well.
User avatar
emartine
Posts: 660
Joined: Thu Dec 29, 2011 10:47 am

Re: Nagios XI Deadpool can't delete a server and services

Post by emartine »

5.5.9 Latest Version

I will PM you the output.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Nagios XI Deadpool can't delete a server and services

Post by ssax »

So it looks like it's used in a host escalation and because of that it's being blocked from being deleted and would loop over and over like that. You can either remove fakeserver from the the fakeserver_lv1 host escalation and it should be deleted on the next deadpool go-round OR you can manually remove both OR you can put fakeserver in the exclude filter in your deadpool settings to keep it from logging all that info.

PROCESSING HOSTS...
Processing host 'fakeserver' in stage 2
NagiosQL Host ID = 151
SQL: DELETE FROM tbl_lnkHostToHostgroup WHERE idSlave='17' AND idMaster='151'
SQL: SELECt * FROM tbl_lnkHostToHostgroup WHERE idMaster='151'
SQL: UPDATE tbl_host SET last_modified='2019-02-11 17:36:07' WHERE id='151'
Deleting host's services...
COMMAND: cd /usr/local/nagiosxi/scripts && ./ccm_delete_object.php --type service --config='fakeserver'
PHP Warning: Invalid argument supplied for foreach() in /usr/local/nagiosxi/html/includes/components/nagiosim/nagiosim.inc.php on line 491
RET: 1 Array
(
[0] => No services were found for config 'fakeserver' in the CCM database.
)
Deleting host...
COMMAND: cd /usr/local/nagiosxi/scripts && ./ccm_delete_object.php --type host --id=151
PHP Warning: Invalid argument supplied for foreach() in /usr/local/nagiosxi/html/includes/components/nagiosim/nagiosim.inc.php on line 491
RET: 1 Array
(
[0] => No services were found for config 'fakeserver' in the CCM database.
[1] => <span class='relationInfo'>Object ID: <strong>151</strong> of table <strong>tbl_host:</strong><br /></span>
[2] => Relation to <strong>Hostescalations</strong>, entry: <strong>fakeserver_lv1 - </strong><span class='dependent'>Dependent relationship</span><br />
[3] => Object still has dependent relationships! <strong>Item was not deleted.</strong><br />
)
Deleting hosts performance data files...
COMMAND: rm -rf /usr/local/nagios/share/perfdata/fakeserver
RET: 0 Array
(
[0] => No services were found for config 'fakeserver' in the CCM database.
[1] => <span class='relationInfo'>Object ID: <strong>151</strong> of table <strong>tbl_host:</strong><br /></span>
[2] => Relation to <strong>Hostescalations</strong>, entry: <strong>fakeserver_lv1 - </strong><span class='dependent'>Dependent relationship</span><br />
[3] => Object still has dependent relationships! <strong>Item was not deleted.</strong><br />
User avatar
emartine
Posts: 660
Joined: Thu Dec 29, 2011 10:47 am

Re: Nagios XI Deadpool can't delete a server and services

Post by emartine »

Is that in the documentation?
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: Nagios XI Deadpool can't delete a server and services

Post by tgriep »

The inability to remove a Host or Service because of a Dependent Relationship is the expected behavior for the Nagios System.
It keeps the system from creating a bad configuration from happening and causing the system from starting.

This link has some more details.
https://support.nagios.com/kb/article/n ... ost-5.html
Be sure to check out our Knowledgebase for helpful articles and solutions!
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Nagios XI Deadpool can't delete a server and services

Post by ssax »

I just checked and it's not in there, I will recommend that that be added to the documentation and hopefully to the interface as well to avoid confusion since it's technically working the way it should.
User avatar
emartine
Posts: 660
Joined: Thu Dec 29, 2011 10:47 am

Re: Nagios XI Deadpool can't delete a server and services

Post by emartine »

The behavior it exhibited was to email every almost evey minute saying it was attempting to delete. Maybe a message should be sent out saying that it has an escalation? Just a thought.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Nagios XI Deadpool can't delete a server and services

Post by ssax »

I agree that's an issue and I'm surprised that it occurred, I'm looking at the code now to see what can be done.
Locked