nagiosql_delete_host.php

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
paul.jobb
Posts: 167
Joined: Tue Aug 02, 2011 4:37 pm

nagiosql_delete_host.php

Post 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
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: nagiosql_delete_host.php

Post 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?
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.
paul.jobb
Posts: 167
Joined: Tue Aug 02, 2011 4:37 pm

Re: nagiosql_delete_host.php

Post 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
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: nagiosql_delete_host.php

Post 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.
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.
paul.jobb
Posts: 167
Joined: Tue Aug 02, 2011 4:37 pm

Re: nagiosql_delete_host.php

Post by paul.jobb »

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

Post by sreinhardt »

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.
Locked