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
nagiosql_delete_service.php Error Call to undefined function
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: nagiosql_delete_service.php Error Call to undefined func
nagiosql_delete_service.php is deprecated, it had been replaced with ccm_delete_object.php
e.g.
see Backend section here:
https://www.nagios.com/nagios-xi-5-5/#features
e.g.
Code: Select all
/usr/local/nagiosxi/scripts/ccm_delete_object.php --type service --id=xxx
https://www.nagios.com/nagios-xi-5-5/#features
Re: nagiosql_delete_service.php Error Call to undefined func
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.
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.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: nagiosql_delete_service.php Error Call to undefined func
Great, glad to hear it is workingskynardo 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.
Locking thread