Deadpool not deleting Stage 2 Services.

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
yo_marc
Posts: 83
Joined: Thu Aug 11, 2016 1:56 pm

Re: Deadpool not deleting Stage 2 Services.

Post by yo_marc »

Unfortunately - Still having the same problems...

- Upgraded to 5.5.3.
- Reset the "Config Manager Backend Password" in the Admin -> Security Credentials page.

I put my Service in question (All Disks) back into the deadpool servicegroup, but it's still only getting removed from that group.
I still also get the 'Login Required!' error in the nagiosql.delete.service file.

I went looking for a 'nagiosxi' user. I don't have one... however, I noticed how 'nagiosadmin' is used as the CCM admin username.

Just to be sure, I:

- Reset the 'nagiosadmin' password in the 'Admin -> Manage Users' area.
- Set the same password in the 'Admin -> Security Credentials' page: "New Config Manager Admin Password".

Still no luck...
yo_marc
Posts: 83
Joined: Thu Aug 11, 2016 1:56 pm

Re: Deadpool not deleting Stage 2 Services.

Post by yo_marc »

Success!

I found that the /usr/local/nagiosxi/scripts/nagiosql.cookies file was a year old. I noticed what looks like a hashed password in there. I again reset passwords as I mentioned in my last post, and did not see this file updated - even after run of "./reconfigure_nagios.sh" and "./nagiosql_delete_service.php --id=1866".

I noticed 'nagiosql_login.php' is the script which sets the cookie file. I ran nagiosql_login.php manually. It generated a new nagiosql.cookies file with an updated hash.

A re-run of the "./nagiosql_delete_service.php --id=1866" command did not generate a "Login Required!" error in the nagiosql.delete.service file.

Ran through my steps to re-add my service-in-question to the deadpool service group again -- and it's now getting fully processed and removed.

I'm not sure why the nagiosql.cookies file was not being properly regenerated automatically. But my force of it did fix the problem.

I have two other XI servers I started to experiment with:

An upgraded 5.5.3 server where I have not touched CCM/other passwords in some time - I found old services on that machine in the same state. Alerting for long time, not in deadpools. I did the same action on that machine (forced login / update of cookies file), and that XI server is also now processing the deadpool services ok.

I have a 5.5.2 server I will check out next. The deadpool timeframes on that are quite extended. Not sure there is anything to process yet.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Deadpool not deleting Stage 2 Services.

Post by scottwilkerson »

Actually you should delete the cookie file and let it get created when running an Apply Configuration from the gui

this will endure the coolie file gets created with the correct permissions
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
yo_marc
Posts: 83
Joined: Thu Aug 11, 2016 1:56 pm

Re: Deadpool not deleting Stage 2 Services.

Post by yo_marc »

Thanks - Good to know. I did notice the permission differences and reset them appropriately. (If I just left original file in place when manually running nagiosql_login.php, all was well - the original file was simply updated).

I am looking at my 5.5.2 server and am not seeing this problem.

Edit: By "not seeing this problem" - I mean the nagiosql.cookie file is quite recent. However, see next post down. It's not getting regenerated if its missing.
Last edited by yo_marc on Wed Aug 29, 2018 2:38 pm, edited 1 time in total.
yo_marc
Posts: 83
Joined: Thu Aug 11, 2016 1:56 pm

Re: Deadpool not deleting Stage 2 Services.

Post by yo_marc »

scottwilkerson wrote:Actually you should delete the cookie file and let it get created when running an Apply Configuration from the gui
So I moved aside the cookie file on my 5.5.2 system and did an Apply Config via GUI. It did not regenerate the cookie file...

My hunch is this is what caused the original problem I was facing.

Edit: Not getting regenerated on 5.5.3 system either.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Deadpool not deleting Stage 2 Services.

Post by scottwilkerson »

Actually, my apologies, this changed in 5.5.x to not use the cookie for reconfigure

Also, as a note, the system should be using ccm_delete_object.php now instead of nagiosql_delete_service.php per the backend section on this page

https://www.nagios.com/nagios-xi-5-5/
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
yo_marc
Posts: 83
Joined: Thu Aug 11, 2016 1:56 pm

Re: Deadpool not deleting Stage 2 Services.

Post by yo_marc »

No problem! Ok - I'll check that out...
yo_marc
Posts: 83
Joined: Thu Aug 11, 2016 1:56 pm

Re: Deadpool not deleting Stage 2 Services.

Post by yo_marc »

I am looking at the updated (5.5.3) /usr/local/nagiosxi/cron/deadpool.php script. Wondering how I was still facing this issue post-upgrade.

I see references to the new ccm_delete_object.php script...

But I still see a call of "./nagiosql_delete_service.php --id=" at line 675... Looks like this one might have been missed in the changeover?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Deadpool not deleting Stage 2 Services.

Post by scottwilkerson »

oh you are correct, that line should read

Code: Select all

$cmd = "cd " . get_root_dir() . "/scripts && ./ccm_delete_object.php --type service --id=" . $nagiosql_service_id . "";
you can safely make that change. I will get it updated for the next release
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
yo_marc
Posts: 83
Joined: Thu Aug 11, 2016 1:56 pm

Re: Deadpool not deleting Stage 2 Services.

Post by yo_marc »

Thanks! Will make the change on my Xi servers.

I think I am good to go... you can close this out.
Locked