How to get memory metrics of all host in the account

Hi ,

How can I export memory metrics of all the hosts in the account.

I tried using using Data explorer, metrics API but it will allow only top 100 entries.

Hello @kethind ,

I recommand checking the Dynatrace api client Python :

With the example below :

<span class=""># Get all hosts and some properties</span>
<span class="">for</span> <span class="">entity</span> <span class="">in</span> <span class="">dt</span>.<span class="">entities</span>.<span class="">list</span>(<span class="">'type("HOST")'</span>, <span class="">fields</span><span class="">=</span><span class="">"properties.memoryTotal,properties.monitoringMode"</span>):
    <span class="">print</span>(<span class="">entity</span>.<span class="">entity_id</span>, <span class="">entity</span>.<span class="">display_name</span>, <span class="">entity</span>.<span class="">properties</span>)

Regards Aurélien

You can use below api to get this memory information,

https://{environmentid}.live.dynatrace.com/api/v2/entities?entitySelector=type(“HOST”)&entitySelector=type(“HOST_GROUP”)&fields=properties.detectedName,properties.memoryTotal,properties.isMonitoringCandidate,tags,managementZones&pageSize=1000&Api-Token={Your api access token with appropriate permission}