Page 1 of 1
nagiosql_delete_service.php Error Call to undefined function
Posted: Fri Feb 15, 2019 11:37 am
by skynardo
After upgrading to Nagios XI 5.5.7, we are getting the following error trying to run nagiosql_delete_service.php
Is there a bug in this version? I was not able to find this error when searching the forum.
URL:
http://localhost/nagiosxi/includes/components/ccm/
PHP Fatal error: Call to undefined function db_connect_nagiosql() in /usr/local/nagiosxi/scripts/nagiosql_delete_service.php on line 35
Could not delete Services for
hostname
Re: nagiosql_delete_service.php Error Call to undefined func
Posted: Fri Feb 15, 2019 11:57 am
by scottwilkerson
nagiosql_delete_service.php is deprecated, it had been replaced with ccm_delete_object.php
e.g.
Code: Select all
/usr/local/nagiosxi/scripts/ccm_delete_object.php --type service --id=xxx
see Backend section here:
https://www.nagios.com/nagios-xi-5-5/#features
Re: nagiosql_delete_service.php Error Call to undefined func
Posted: Fri Feb 15, 2019 12:48 pm
by skynardo
Thank you, I was able to edit my script
replacing ./nagiosql_delete_service.php --config=$HSTNM
with ./ccm_delete_object.php --type service --config=$HSTNM
and
replacing ./nagiosql_delete_host.php --host=$HSTNM
with ./ccm_delete_object.php --type host --name=$HSTNM
Seems to working fine.
Re: nagiosql_delete_service.php Error Call to undefined func
Posted: Fri Feb 15, 2019 12:58 pm
by scottwilkerson
skynardo wrote:Thank you, I was able to edit my script
replacing ./nagiosql_delete_service.php --config=$HSTNM
with ./ccm_delete_object.php --type service --config=$HSTNM
and
replacing ./nagiosql_delete_host.php --host=$HSTNM
with ./ccm_delete_object.php --type host --name=$HSTNM
Seems to working fine.
Great, glad to hear it is working
Locking thread