Page 1 of 1

nagiosql_delete_host.php

Posted: Fri May 09, 2014 10:49 am
by paul.jobb
I run this command as ./nagiosql_delete_host.php --host=EDM-GOA-AMS-1 from the /usr/local/nagiosxi/scripts directory and it appears to work however it doesn't remove the item from core config manager. Same behaviour with nagiosql_delete_service.php, the server version Nagios XI 2012R2.9. This process is working on another nagios server I have with no problems.


URL: http://localhost/nagiosql/admin/hosts.php
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosql/admin/hosts.php --no-check-certificate --post-data 'chbId_79=on&selModify=delete&hidModify&modus=checkform' -O nagiosql.delete.host
--2014-05-09 09:17:30-- http://localhost/nagiosql/admin/hosts.php
Resolving localhost... ::1
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://localhost/nagiosql/index.php [following]
--2014-05-09 09:17:30-- http://localhost/nagiosql/index.php
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5259 (5.1K) [text/html]
Saving to: ânagiosql.delete.hostâ

100%[======================================>] 5,259 --.-K/s in 0s

2014-05-09 09:17:30 (363 MB/s) - ânagiosql.delete.hostâ

Thanks,
Paul

Re: nagiosql_delete_host.php

Posted: Fri May 09, 2014 1:07 pm
by sreinhardt
I am seeing the same thing with a host that has no dependencies on my system. What version is your other nagios system?

Re: nagiosql_delete_host.php

Posted: Fri May 09, 2014 4:12 pm
by paul.jobb
version Nagios XI 2012R2.9 is the server its not working on, it appears to be up to date.

The system that it is working on is Nagios XI 2012R1.4

Re: nagiosql_delete_host.php

Posted: Mon May 12, 2014 10:06 am
by sreinhardt
This is most likely an issue with the nagiosql cookie file. Try the following:

Code: Select all

cd /usr/local/nagiosxi/scripts/
./reconfigure_nagios.sh
./nagiosql_delete_host.php --host=EDM-GOA-AMS-1
I will still file an internal bug report, as the cookie file should get renewed before the attempted delete, so that this does not happen.

Re: nagiosql_delete_host.php

Posted: Mon May 12, 2014 10:52 am
by paul.jobb
Thank you that worked, both for hosts and services.

Re: nagiosql_delete_host.php

Posted: Mon May 12, 2014 10:55 am
by sreinhardt
Cool I'll lock this up, an internal report to resolve this has been submitted.