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

Is there a V2 (or V1) API Call to Show Platform??

louis_gallo
Helper

I can pull metrics quite nicely now for hosts, process group instances, and custom devices. 

 

My question is if there is an API call that can show the platform for an entity - i.e. Windows, Linux, OpenShift, other?

 

Any help is appreciated.

 

Thanks,

 

Lou

3 REPLIES 3

Julius_Loman
DynaMight Guru
DynaMight Guru

Sure there is. You need to call the Monitored Entities v2 API to fetch information about any entities.  For example to query OS Type for a host you need to specify +properties.osType in the fields query parameter.
Be sure to use API client for the API such as dt if it fits your scenario..
If you want to to query OS type of a process group, you can query it using relationships. For example to query HOST running a PROCESS_GROUP_INSTANCE:

type(HOST),toRelationships.isProcessOf(entityId(PROCESS_GROUP_INSTANCE-0945C0E96C7D297A))

 

Certified Dynatrace Master | Alanata a.s., Slovakia, Dynatrace Master Partner

Thank you for the reply.

 

If I can only have a dt.host.name, I assume that I have to convert that to an entityId first right? How can I do that. Most of my data coming back as dt.host.name.

 

Hopefully that makes sense.

It depends. You can also query host by host names and fetch the host properties. You can query the host by the entitySelector:

type(HOST),entityName(....)
Certified Dynatrace Master | Alanata a.s., Slovakia, Dynatrace Master Partner