nagiosql_delete_service.php Error Call to undefined function

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
skynardo
Posts: 136
Joined: Tue Sep 18, 2012 8:59 am
Location: St. Louis, MO

nagiosql_delete_service.php Error Call to undefined function

Post 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
scottwilkerson
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

Post 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
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
skynardo
Posts: 136
Joined: Tue Sep 18, 2012 8:59 am
Location: St. Louis, MO

Re: nagiosql_delete_service.php Error Call to undefined func

Post 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.
scottwilkerson
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

Post 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
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked