28 Feb 2023 03:08 PM
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.
Solved! Go to Solution.
28 Feb 2023 05:39 PM
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
28 Feb 2023 07:39 PM
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}