30 Jan 2022 03:35 PM - last edited on 21 Aug 2024 09:58 AM by Michal_Gebacki
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
Solved! Go to Solution.
30 Jan 2022 09:28 PM
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))
03 Feb 2022 10:28 PM
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.
05 Feb 2022 06:54 PM
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(....)