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

Dynatrace DDU usage API

atos_costa
Newcomer_

Hi,

 

I need to extract ddu usage so I can bill consumers based on Management Zone.

Our consuption is around 1 million DDUs per month.

 

I'm filtering only TYPE of entity and period.

URL like this:

https://<dynatrace>/api/v2/metrics/query?metricSelector=builtin:billing.ddu.metrics.byEntity&entityS...

 

However, some types, CLOUD_APPLICATION for example, returns an warning on quering:

"Query resolved XXXXX entities which breaches the limit of 5000. Adjust the query with entitySelector or refined filters."

 

The question is: Which filter could I use to make this query lighter?

I can't filter with MZones because I have a lot of monitored entities that are not associated with a MZone, but I need to calculate all DDUs used.

I can't filter with Monitored Entity because they are thousands and this would be a very slow way to do it, thousands of Monitored Entities with hundreds of Types.

 

Thanks in advance.

3 REPLIES 3

atos_costa
Newcomer_

URL was truncated on original post.

It is:

/api/v2/metrics/query?metricSelector=builtin:billing.ddu.metrics.byEntity&entitySelector=type(CLOUD_APPLICATION)&from=now-1h&to=now&resolution=d

Michal_Gebacki
Community Team
Community Team

Hey guys! Does anybody have some ideas or tips regarding this issue? 

 

Thanks in advance for any help!

At my previous employer I tracked the data via an excel sheet on a monthly basis. While I dont have the access to this sheet anymore it was constructed as such. 

 

Applications: 

We listed each application, then listed the number of users and user sessions for that application. This allowed us to track the number of users (internal and external) and the usage and allocation of licenses from that stand point. You can also use it for bill back to your teams. SO if the Easy Travel Team had 100K user sessions in November, Look at your license and determine the usage cost. 100K Divided by 4 (if 4 user sessions - 1 DDU) = 25,00 DDUs.

 

Synthetics: 

Once again list the synthetics and get the usage of each synthetic, much like you did for the Applications above. You can also leverage new charts that focuses on the License usages which should help you simplify things. Once again you will need to look at your contract and see how synthetics add up to a usage of a DDU, and of course HTTP vs Browser Monitor usage. 

 

Custom Metrics: 

These also use DDUs from my understanding so you will need to find out how many custom metrics the EasyTravel Team is using and how it adds up to a DDU usage. 

 

With these aspects broken out you are able to forecast the usage and overages. When I did this, we were within $500 of the actual overage that we faced at the end of the year. All while being able to report on as to why we were over, was it because we had more customers? or was it because we did more Synthetics, or custom monitoring? The company never did have a problem if it was the paying customers that drove us into the overages, but if an overage was due to an employee, there better be a good reason. 

 

That's just how I did it back then. Like I said, I wish I had a copy of that license tracker, as it had everything laid out from the allocated usage per application/synthetics, to the actual usage if we were over or under that monthly allocation per month, then Per Quarter as well. Because if you are Over 20k In January, but under the allocation by 20k in February, your still on track. So we even had a Quarter totaling that showed if we were over or under and by hw much per quarter, then we had the running total of the overage and the cost of that overage per the contract. 

 

I was pretty proud of the sheet, I hope they are still using the basics of it at least. 

 

Here is a quick mock up of its fundamentals: 

ChadTurner_0-1640272982847.png

 

You might be also able to leverage the DDU Charts via custom charting/Data Explorer and put in your MZs to get your totals.

 

-Chad

Featured Posts