21 Jun 2024 07:08 AM - last edited on 21 Jun 2024 09:31 AM by MaciejNeumann
Hi,
I'm keen to know if there's a way to generate a report that includes operating system version for a specific operating system in Dynatrace?
At present, using hosts page/API, I can segregate them based on OS but not OS version.
Any tips would be helpful.
Regards,
Srikanth
21 Jun 2024 02:22 PM - edited 21 Jun 2024 02:27 PM
Hello @SrikanthSamraj,
if you are using API v2 you can use, entities API, and below are samples:
Sample 1:
/api/v2/entities?entitySelector=type(host),osVersion("Windows Server 2016 Standard ver. ")&fields=+properties.osType,+properties.osVersion,+properties.monitoringMode
Sample 2:
/api/v2/entities?entitySelector=type(host)&fields=+properties.osType,+properties.osVersion,+properties.monitoringMode
you can adjust the fields based on your requirements for which info you need to export
Best Regards,
Mohamed
25 Jun 2024 01:09 PM
Thanks for the response @Mohamed_Hamdy I wish if this option of looking out for osVersion is included in /api/v1/oneagents..
01 Jul 2024 08:28 PM
Hey @SrikanthSamraj ,
If you're still looking for a way out and you are on the latest version of Dynatrace SaaS and Grail enabled, you can build up a query like this.
fetch dt.entity.host
| fieldsAdd osType,osVersion
| filter osVersion == "Oracle Linux Server 7.9 (kernel 3.10.0-1160.118.1.0.1.el7.x86_64)"
edit the filter to suit your needs.
Happy querying.😉
Regards,
@Maheedhar_T
02 Jul 2024 04:11 PM
Thanks much @Maheedhar_T. I'm yet to get my access enabled to use the latest version of Dynatrace SaaS with Grail enabled.
22 Jul 2024 11:39 AM
@Maheedhar_T - I've got access to latest Dynatrace and Grail, when I run query a like below it did generate result as expected but it is limited to just 1000 rows. Any ways to get result for entire hosts?
fetch dt.entity.host
| fieldsAdd entity.type, lifetime, tags, osType, hypervisorType, state, cpuCores, memoryTotal, oneAgentCustomHostName, dnsNames, ipAddress, osVersion, installerVersion, osArchitecture, bitness, osServices, paasVendorType, cloudType, networkZone, monitoringMode, standalone, autoInjection, installerPotentialProblem, logicalCpus, physicalMemory, customHostMetadata, additionalSystemInfo, logicalCpuCores, virtualCpus, isMonitoringCandidate
| filter osType == "AIX"
22 Jul 2024 12:10 PM
Got this, after inferring below one,
https://community.dynatrace.com/t5/Dashboarding/Dynatrace-Notebook-entity-name/m-p/215299
22 Jul 2024 12:39 PM
Hi @SrikanthSamraj ,
You can increase the limit by providing
| limit 100000
at the end of the DQL but based on the number of hosts you are trying to fetch it may crash the query.
I suggest you use the same DQL in a workflow to get better output.