REST API to delete all services on host

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
madhu2852
Posts: 50
Joined: Mon Aug 28, 2017 1:13 pm

REST API to delete all services on host

Post by madhu2852 »

Hi,

I've a question for you guys , is there a way that i can delete all the services related to a host using an API call. I know there is an object reference guide which shows how to list,add,delete the host and services individually but my request to give a hostname somewhere in the api call and it should delete all the services associated to the host.

Regards,
Madhu
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: REST API to delete all services on host

Post by npolovenko »

Hello, @madhu2852. This is not supported as of right now. However, there're more API features coming in the XI 5.5.0 release. Keep an eye on our website.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
dusan
Posts: 1
Joined: Thu Dec 28, 2017 5:37 am

Re: REST API to delete all services on host

Post by dusan »

It would be really great to have this option (to automate host removal via API).
Will it make it to 5.5?

No mentions at the moment in https://assets.nagios.com/downloads/nag ... 1514284966
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: REST API to delete all services on host

Post by npolovenko »

@dusan, I talked to our Dev team and they told me that this feature is indeed on a roadmap. However, implementing object association is a bit tricky when services have children services or other dependencies. Nagios'd have to trace those dependencies and get rid of them as well. Otherwise, that could cause configuration problems. So yes, this feature request does already exist but It'll probably take some time to be released. No exact date or version yet.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked