How to get the details of host name, hostgroup details from particular MZ using DQL

I tried below query but not working. can someone help me with query.

fetch dt.entity.host

| managementzones == “Cloud : AWS”

|flieds hosts, hostgroup

it  is giving blank result

Hey @Sisapy09

In the above query you are missing the filter command. By simply typing “managementzones == cloud:aws” Dynatrace doesn’t know to use this as a filter. You would have something like the below. Also something else to note, the fields you specified are incorrect too. When using the fields command there should be a suggestion list which is useful for determining the fields available.

In the future there is also this documentation which details all of the commands available and provides examples of how to use them. Hope this helps!