Nagios team,
I'm inheriting NagiosXI environment where I found there are quite a few orphans HostGroup I would like to get rid of.
Please advise!
Delete HostGroups via API
-
nagwindmon
- Posts: 92
- Joined: Mon Dec 01, 2014 3:39 pm
Delete HostGroups via API
Last edited by nagwindmon on Fri Jun 02, 2017 10:35 am, edited 1 time in total.
-
avandemore
- Posts: 1597
- Joined: Tue Sep 27, 2016 4:57 pm
Re: Delete HostGroups via API
The easiest way to handle is to delete it via the CCM:
XI > Configure > CCM > Host Groups
You can view the relationships to see if some dependencies are blocking the deleting.
XI > Configure > CCM > Host Groups
You can view the relationships to see if some dependencies are blocking the deleting.
Previous Nagios employee
-
nagwindmon
- Posts: 92
- Joined: Mon Dec 01, 2014 3:39 pm
Re: Delete HostGroups via API
I would not say easiest... there are over 100s and not listed in any order so I need search for each one and delete individually??
I have pulled a list of those from DB into csv file and was hoping I could loop thru utilizing API...
I have pulled a list of those from DB into csv file and was hoping I could loop thru utilizing API...
-
avandemore
- Posts: 1597
- Joined: Tue Sep 27, 2016 4:57 pm
-
nagwindmon
- Posts: 92
- Joined: Mon Dec 01, 2014 3:39 pm
Re: Delete HostGroups via API
so there is no API call exist I can use to delete HostGroups??
-
avandemore
- Posts: 1597
- Joined: Tue Sep 27, 2016 4:57 pm
Re: Delete HostGroups via API
The existing API calls for your installed version can be found at XI > Help > REST API Docs. In some cases the API is unreliable.
Previous Nagios employee
-
nagwindmon
- Posts: 92
- Joined: Mon Dec 01, 2014 3:39 pm
Re: Delete HostGroups via API
ok, let me ask you this: is there an API to delete a hostgoups and if yes in which XI version its available from?
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: Delete HostGroups via API
Currently, you cannot delete host groups via the API. You could delete things directly from the database, but we generally discourage this.
The Bulk Modifications Tool is technically part of the CCM, but it is only available to Enterprise customers. See http://YOURSERVER/nagiosxi/includes/com ... /index.php
The Bulk Modifications Tool is technically part of the CCM, but it is only available to Enterprise customers. See http://YOURSERVER/nagiosxi/includes/com ... /index.php
-
nagwindmon
- Posts: 92
- Joined: Mon Dec 01, 2014 3:39 pm
Q
yes, we're Enterprise customers, so let me check that option out
Thanks!
Thanks!
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: Delete HostGroups via API
OK, let us know!