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
nagiosql_delete_host.php
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: nagiosql_delete_host.php
I am seeing the same thing with a host that has no dependencies on my system. What version is your other nagios system?
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Re: nagiosql_delete_host.php
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
The system that it is working on is Nagios XI 2012R1.4
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: nagiosql_delete_host.php
This is most likely an issue with the nagiosql cookie file. Try the following:
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.
Code: Select all
cd /usr/local/nagiosxi/scripts/
./reconfigure_nagios.sh
./nagiosql_delete_host.php --host=EDM-GOA-AMS-1Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Re: nagiosql_delete_host.php
Thank you that worked, both for hosts and services.
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: nagiosql_delete_host.php
Cool I'll lock this up, an internal report to resolve this has been submitted.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.