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

How to get memory metrics of all host in the account

kethind
Frequent Guest

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.

 

2 REPLIES 2

AurelienGravier
DynaMight Champion
DynaMight Champion

Hello @kethind ,

 

I recommand checking the Dynatrace api client Python :

https://github.com/dynatrace-oss/api-client-python

With the example below :

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

 

Regards Aurélien

Observability consultant - Dynatrace Associate/Pro/Services certified

sharjeelb
Observer

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}

Featured Posts