07 Mar 2019 07:15 AM
The API only allows one to retrieve memory available (com.dynatrace.builtin:host.mem.available) and memory used (com.dynatrace.builtin:host.mem.used), I don't see an option for total memory. Am I right in saying that to get total memory, I could simply add available and used? What about the newly introduced reclaimable memory, will that make it into the timeseries metrics and how would that affect my calculation, if at all?
I'm pulling the json data for available and used memory into Power BI, but the total never adds up correctly - I checked the values prior to pulling them into BI and even then they don't add up correctly...has anyone else seen this? Either I'm doing something wrong, or misunderstanding the values. I've checked the values (Bytes) and irrespective of whether I divide the Bytes value by 1024 (binary) or 1000 (decimal) to get to KB, it ends up with the incorrect values. I've tried using MAX, MIN, AVG over very short and longer timeframes, using TOTAL instead of SERIES, but I never get the values I see on the host details dashboard.
Solved! Go to Solution.
25 Mar 2019 06:59 PM
I would also be interested in this... there should be a "total" timeseriesId type...
Or, they should just add the "total memory" value as a property returned for the standard Hosts calls
12 Aug 2019 05:56 PM
I have a similar question / issue. I want to retrieve the total memory for each monitored server, and I am unable to make sense of the values that are returned via com.dynatrace.builtin:host.mem.used. The value returned by the API does not match the total, reclaimable, or used values shown in Dynatrace, or any combination of these. Is there any way to programatically obtain the total server memory?
17 Aug 2020 07:05 AM
1 year later no one from Dynatrace answer this question. This is such
basic functionality, that the API cannot provide. And we are paying
millions for this software
17 Aug 2020 10:45 AM - last edited on 16 Oct 2023 03:21 PM by random_user
There is an RFE for this:
https://community.dynatrace.com/idea/239057/including-host-total-memory-in-the-manage-host-api.html
17 Aug 2020 11:40 AM
so if we bought a 32 GB of RAM for server,
and the online Shop even bill me for 32GB of RAM,
and we install it to the hardware and Bios detect 32 GB of RAM,
and Windows said also 32 GB of RAM,
and Dynatrace (we paid millions) said look here calculate yourself ...
is that it ?
26 Apr 2022 12:57 PM
Sharing this information from @Julius_Loman from the related Product Idea:
This is possible now through Monitored entities v2 API.
The memory information is available in host properties, see below:
{
"entityId": "HOST-21D46EE82F6733A8",
"displayName": "xxx.yyy",
"firstSeenTms": 1600762172193,
"lastSeenTms": 1631130266472,
"properties": {
"bitness": "64",
"detectedName": "xxx.yyy",
"installerTrackedDownload": false,
"oneAgentCustomHostName": "",
"monitoringMode": "FULL_STACK",
"installerVersion": "1.223.105.20210824-140926",
"ipAddress": [
"1.2.3.4"
],
"osArchitecture": "X86",
"hypervisorType": "VMWARE",
"networkZone": "default",
"standaloneSpecialAgentsOnly": false,
"isMonitoringCandidate": false,
"logicalCpuCores": 4,
"osVersion": "Red Hat Enterprise Linux Server 7.8 (Maipo) (kernel 3.10.0-1127.el7.x86_64)",
"cpuCores": 4,
"installerPotentialProblem": false,
"memoryTotal": 16656887808,
"osType": "LINUX",
"installerSupportAlert": false,
"state": "RUNNING"
},
...
This is a oneliner to get the overview of your hosts:
curl -XGET -H "Authorization: api-token $APITOKEN" "$TENANT/api/v2/entities?entitySelector=type(HOST)&fields=properties.detectedName,properties.monitoringMode,properties.memoryTotal,properties.isMonitoringCandidate,tags,managementZones&pageSize=1000" |jq '.'