Page 1 of 1
Marking HostGroups active/deactive
Posted: Mon Dec 14, 2020 9:46 am
by dh0125e
When we push our Services between XI's the hostgroups that are referenced are created automatically (which is good) however they are set Active=False (which is bad). How do we enable these host groups via the API? I can't find anything in the API for this.
Re: Marking HostGroups active/deactive
Posted: Tue Dec 15, 2020 4:15 pm
by dchurch
You're not missing anything in the documentation. Unfortunately making a hostgroup or a servicegroup active or inactive isn't supported by the API currently.
Ideally, one should be able to make the change by sending a PUT request with is_active=1 to the API under
http://example.com/nagiosxi/api/v1/conf ... group-name, or -- even better -- with the POST request that created the group, but
these fields aren't supported by the API (yet).
I can submit a feature request on your behalf if you'd like. Please keep in mind that the decision to implement the enhancement is at the discretion of our development team.
Re: Marking HostGroups active/deactive
Posted: Tue Dec 15, 2020 4:30 pm
by dh0125e
Yes this is a going to cause a large amount of extra manual effort to go behind the automations to "finish" monitoring applications.
Re: Marking HostGroups active/deactive
Posted: Wed Dec 16, 2020 10:22 am
by dchurch
Okay, I've submitted the feature request to our dev team. With any luck it will be available in the next release cycle.
Code: Select all
Subject: Add is_active support to hostgroup/servicegroup API
Summary:
Please add support for setting and changing the "active" field in:
- PUT /config/{host,service}group/{name}
- POST /config/{host,service}group
Please also update the doc to reflect the request format you go with.