10 Feb 2021 08:18 PM
I'm new to Dynatrace and was curious to know if the product can generate an inventory report. Specifically, I'm looking for the following fields;
• Server Name
• Serial Number
• Manufacturer
• Model
• Operating System
• OS Version
• BIOS Manufacturer & Version
• Number of CPU cores
• Number of sockets
• Host Name
• IP Address
Solved! Go to Solution.
10 Feb 2021 10:12 PM
the easiest way to get this data is to access the Dynatrace API. To get to the API click the person and then Environment API:
Once there locate Topology & Smartscape - Hosts:
if you are looking for a singular host then use the second get command. if you want all your hosts, use the first get command option. Click into one of them. Now no matter what one you select, you will need an API Token. Back in Dynatrace, go to Settings>Integration>Dynatrace API and create a new API Token. Give it a name and give it read permissions:
Create your token and copy the Token Key, this is your only chance to Copy it, If it gets lost you will need to create a new one! Or so they say, I found a work around to that 😉 so paste your token in notepad for safe keeping and jump back the API Screen and click the lock icon and supply your token and click authorize.
Once completed and authorized, you will always need to click "Try it out" to try out the api selected. Click that and fill out the sections as needed to narrow down a scope, then click execute at the bottom and a Json will compile with your data.
You can see some of the sample data from the image. It should contain almost all of what you are looking for about the hosts in Dynatrace.
A lot of your things you are asking for, you can also create auto tagging rules which will allow you to sort and filter hosts that say have OS: Server 2012, vs. 2016 etc..
Some of the items you might not be able to get:
Server Name
• Serial Number
• Manufacturer
• Model
• BIOS Manufacturer & Version
09 May 2024 05:01 PM
For anyone returning to this thread in the future, I was focused on finding the MAC Address and Serial number for Hosts. Using Chad's message as guidance, the following cURLs will pull the information. The API token needs `entities.read` scope applied. Documentation reference.
curl -X 'GET' 'https://{SaaS_Tenant_FQDN}/api/v2/entities/{entitiyID}' -H 'accept: application/json; charset=utf-8' -H 'Authorization: Api-Token dt0c01.{token}' | jq '.properties.macAddresses'
curl -X 'GET' 'https://{SaaS_Tenant_FQDN}/api/v2/entities/{entitiyID}' -H 'accept: application/json; charset=utf-8' -H 'Authorization: Api-Token dt0c01.{token}' | jq '.properties.additionalSystemInfo[] | select(.key == "system.board.serial") | .value'