"error": "Could not find a unique id for this service."

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
deek
Posts: 194
Joined: Fri Apr 26, 2019 2:01 am

"error": "Could not find a unique id for this service."

Post by deek »

Hi

I am trying to delete the service from Nagios through REST API command. But getting the below error.

curl -XDELETE "http://xxxx/nagiosxi/api/v1/config/serv ... lyconfig=1

"error": "Could not find a unique id for this service."

Also tried using ccm script, which throws up the below error

./ccm_delete_object.php --type service –-config=xxxx

When using type 'service' you must specifiy one:
-i|--id (object id)
-c|--config (confg name)


What is this unique and object id that we are seeing here.

Ideally, we wanted to delete all services for a given host. But we wanted to test for one service before we proceeding with multiple services.

Please advice.

Thanks
Deepan.
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: "error": "Could not find a unique id for this service."

Post by lmiltchev »

What is the version of Nagios XI that you are currently using? Is this the only service that you are not able to delete? Can you delete other services via the REST API?

Is the service added to more than one host or a hostgroup? Do you see the service and it's ID in the CCM? Do you have more than one service, named "Port" on the same host?

Do you see any errors/crashed tables in the mysql (mariadb) log?

Code: Select all

tail /var/log/mysqld.log
tail /var/log/mariadb/mariadb.log
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked