Page 1 of 1
NagiosXI - api to delete empty hostgroup or servicegroup...
Posted: Tue Apr 16, 2019 3:53 am
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.
Re: NagiosXI - api to delete empty hostgroup or servicegrou
Posted: Tue Apr 16, 2019 9:15 am
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"
Re: NagiosXI - api to delete empty hostgroup or servicegrou
Posted: Tue Apr 16, 2019 10:20 pm
by vishfx
Great !!!
Thanks lmiltchev.
You can close this request.
Regards,
Vish.
Re: NagiosXI - api to delete empty hostgroup or servicegrou
Posted: Wed Apr 17, 2019 9:36 am
by lmiltchev
I am glad I could help!
