Delete host using REST API error on XI version 5.5.11
Delete host using REST API error on XI version 5.5.11
I am using Nagios XI 5.5.11 Rest API to delete a host and get this error: {"error":"Host cannot be deleted using this method. Must be deleted through the CCM."}. I also make sure to delete all the services of this host before delete itself. Based on one of the search result https://support.nagios.com/forum/viewto ... 16&t=42680, I added the sleep for 10 second, looks like it works for sometime, but not all the time. Any help is greatly appreciated.
-
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Delete host using REST API error on XI version 5.5.11
Hi Joseph,
This host might have existing dependent relationships. Can you verify this by going to the Configure > CCM > Monitoring > Hosts and search for the host from the box in the upper right. In the listing, under the actions heading, click on the icon for relationships.
If that is not the issue, can you post the API command for us to review. Thanks
This host might have existing dependent relationships. Can you verify this by going to the Configure > CCM > Monitoring > Hosts and search for the host from the box in the upper right. In the listing, under the actions heading, click on the icon for relationships.
If that is not the issue, can you post the API command for us to review. Thanks
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Delete host using REST API error on XI version 5.5.11
hi benjaminsmith,
Thank you for the quick response. I followed your direction for this host, and the only thing for this host listed on the object relationships is contacts - somename. Nothing else.
the command I used like this:
https://nagiosxiserver/nagiosxi/api/v1/ ... st&force=1
after that, I ran applyconfig=1.
https://nagiosxiserver/nagiosxi/api/v1/ ... y=myapikey
Let me know if more info needed.
Thank you,
Joseph
Thank you for the quick response. I followed your direction for this host, and the only thing for this host listed on the object relationships is contacts - somename. Nothing else.
the command I used like this:
https://nagiosxiserver/nagiosxi/api/v1/ ... st&force=1
after that, I ran applyconfig=1.
https://nagiosxiserver/nagiosxi/api/v1/ ... y=myapikey
Let me know if more info needed.
Thank you,
Joseph
-
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Delete host using REST API error on XI version 5.5.11
Hi Joseph,
I rolled back my text VM to this version and was able to repeat the error you getting. However, on the lastet version it is working with the following command.
I rolled back my text VM to this version and was able to repeat the error you getting. However, on the lastet version it is working with the following command.
Are you able to upgrade to the latest version?curl -XDELETE "http://<ip address>/nagiosxi/api/v1/config/host/testapihost?apikey=<api key>&pretty=1&host_name=testhost&applyconfig=1"
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Delete host using REST API error on XI version 5.5.11
upgrade to 5.6.5 and worked.
Re: Delete host using REST API error on XI version 5.5.11
Glad to hear it's working now!
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!