14 Nov 2020 05:52 AM
Hello Folks,
We have defined some management zones in our environments based on rule "Host-Group" name exists.
Now, we want to replicate the same on other environment and the challenge is, we are able to fetch the host-group entity ID (via API) but not the actual name of host-groups.
How can we get a list of all host-group names from the environment?
Regards,
AK
Solved! Go to Solution.
14 Nov 2020 06:59 AM
You should be able to query all the OneAgents API (/api/v1/oneagents) and extract the HostGroup Object: https://www.dynatrace.com/support/help/shortlink/api-oneagent-on-host#oneagents-get-response-hostgro...
Name -> "The name of the Dynatrace entity, displayed in the UI"
"hostGroup": {
"meId": "string",
"name": "string"
}
The name doesn't show anything?
14 Nov 2020 07:32 AM
Yes it worked. Thanks Dante P. for attention to the query and quick response.
16 Nov 2020 07:51 PM
Hi Akshay,
actually in version 1.205 (even before) you will find the hostgroup identifier and name on the entity V1 API endpoint as well.
/e/<tenantid>/api/v1/entity/infrastructure/hosts
Reinhard
28 Feb 2023 10:31 AM
See also Product Idea Host group visualization in side bar - Dynatrace Community