NagiosXI - api to delete empty hostgroup or servicegroup...

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
vishfx
Posts: 134
Joined: Tue Apr 24, 2018 12:30 pm

NagiosXI - api to delete empty hostgroup or servicegroup...

Post by vishfx »

Hi Nagios Team,

Am using NagiosXI 5.5.8

Is there an api or any other remote method to delete empty hostgroup or servicegroup ?

Regards,
Vish.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NagiosXI - api to delete empty hostgroup or servicegrou

Post by lmiltchev »

This functionality is not available in Nagios XI 5.5.8, but it will be available in Nagios XI 5.6.0, which should be out by the end of this week. I would recommend upgrading your Nagios XI instance when 5.6.0 is out. Then, if you had two empty groups, e.g. "EMPTY-HG" and "EMPTY-SG", you could delete them by running:

Code: Select all

curl -XDELETE "http://x.x.x.x/nagiosxi/api/v1/config/hostgroup?apikey=xxx&pretty=1&hostgroup_name=EMPTY-HG&applyconfig=1"
curl -XDELETE "http://x.x.x.x/nagiosxi/api/v1/config/servicegroup?apikey=xxx&pretty=1&servicegroup_name=EMPTY-SG&applyconfig=1"
Be sure to check out our Knowledgebase for helpful articles and solutions!
vishfx
Posts: 134
Joined: Tue Apr 24, 2018 12:30 pm

Re: NagiosXI - api to delete empty hostgroup or servicegrou

Post by vishfx »

Great !!!
Thanks lmiltchev.

You can close this request.

Regards,
Vish.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NagiosXI - api to delete empty hostgroup or servicegrou

Post by lmiltchev »

I am glad I could help! :)
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked