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

Fetch "Consumed Host Units" for a given Host using the "Monitored Entities API" (API V2)

Alfred-Le
Dynatrace Participant
Dynatrace Participant

Hello!

Does anyone know how to fetch Consumed Host Units for a given host, using the Monitored Entities API?
I have a script which uses the Environment API V1 to grab Consumed Host Units for my hosts, but am looking to migrate to V2.

 

My script has been working fine for a while now, but I'm concerned it might stop working one day seeing as it utilises the Topology and Smartscape API.
**According to this link, this API was Deprecated in v1.263. Given the API hasn't yet broken (as of writing this 03JULY2023), my script is working on borrowed time.

 

The Official Dynatrace DOC has a page to help with migrating from the Topology and Smartscape API to the Monitored Entities API
As can be seen here on the Page, Host Unit Consumption is definitely reported on with Topology and Smartscape API, but I'm struggling to see the same value reported with the Monitored Entities API

AlfredLe_0-1688357684262.png

Does anyone know where I can find Host Unit Consumption using the new Monitored Entities API?

Thanks!

2 REPLIES 2

chakrit
Observer

https://{environmentid}.live.dynatrace.com/api/v1/entity/infrastructure/hosts?relativeTime=2hours&includeDetails=true&API-TOKEN= 

Try again

Alfred-Le
Dynatrace Participant
Dynatrace Participant

Hi @chakrit,
That's the exact API I am looking to pivot away from due to its Deprecated Status.

I have found however, that I can get all the same information provided by v1/entity/infrastructure/hosts in V1 Oneagents on a host.

So am using that instead 😄

Featured Posts