cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Get a list of all host-group names from the environment

AK
Pro

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

4 REPLIES 4

Anonymous
Not applicable

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?

Yes it worked. Thanks Dante P. for attention to the query and quick response.

r_weber
DynaMight Champion
DynaMight Champion

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

Certified Dynatrace Master, Dynatrace Partner - 360Performance.net

fstekelenburg
DynaMight Pro
DynaMight Pro

See also Product Idea Host group visualization in side bar - Dynatrace Community

Kind regards, Frans Stekelenburg                 Certified Dynatrace Associate | measure.works, Dynatrace Partner

Featured Posts