# In Theory will this work for Total Drive space on Hosts using API v2

**URL:** <https://community.dynatrace.com/t/in-theory-will-this-work-for-total-drive-space-on-hosts-using-api-v2/22273>\
**Category:** Dynatrace API\
**Tags:** reports, dynatrace-api\
**Created:** [October 10, 2019, 1:56pm UTC](https://community.dynatrace.com/t/in-theory-will-this-work-for-total-drive-space-on-hosts-using-api-v2/22273 "2019-10-10T13:56:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![runatyr](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/runatyr/32/11396_2.png) [@runatyr](https://community.dynatrace.com/u/runatyr)\
**Post date:** [October 10, 2019, 1:56pm UTC](https://community.dynatrace.com/t/in-theory-will-this-work-for-total-drive-space-on-hosts-using-api-v2/22273/1 "2019-10-10T13:56:59Z")

</div>

Hello:

So my Director has asked me to define several basic resources

“By application”

In this instance. I am being asked to provide

the total drive space available vs the total drive space used

for Application X that lives on a list of servers.

I get what is being asked. There is a goal to tell the Business users

“This applications uses this much space, this much CPU, memory..etc…etc..”

My first thought was simply to pull the disk size in bytes vs the bytes used

As I look through the API v2,

I did NOT see a metric for “disk size in bytes”

What I did find was

“builtin:host.disk.avail”

and “builtin:host.disk.used”

It would follow (I think, please correct me if I am wrong)

That is I had a static point in time of all the “used”

added to the “available” I would have in effect the “total” drive size

So the tricky part is I saw one of 2 ways of doing this

1) Pick a static metric point (say 1 AM.. any day) and pull the stats on all the servers at that point in time only

OR

2) Use the INF setting for resolution

My problem is in the understanding of the term

“One aggregated data point of each series. Set Inf to use this option”

Is this saying that it is taking all the different time series of a metric and adding them then averaging?

Would it be more accurate to simple take option #1 and pick a static point for the day to do the calculation?\>

AM I missing anything fundamental?

Thanks for this awesome community!

---

<div class="post-metadata">

**Author:** ![wolfgang\_beer](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/wolfgang_beer/32/14717_2.png) [@wolfgang\_beer](https://community.dynatrace.com/u/wolfgang_beer)\
**Post date:** [October 15, 2019, 6:59am UTC](https://community.dynatrace.com/t/in-theory-will-this-work-for-total-drive-space-on-hosts-using-api-v2/22273/2 "2019-10-15T06:59:32Z")

</div>

Hi Chris,

The metric API v2 typically is used to fetch the complete series of data points over time for a selected metric such as “builtin:host.disk.avail”. If you want to get one scalar value representing the complete series as one value (typically as average) you can use the ‘Inf’ option.

So you would then get one value that represents the average disk available over the selected period of time.

Best greetings,

Wolfgang

 ![22187-1571122767395.png](https://global.discourse-cdn.com/dynatrace/original/3X/9/a/9ab3ac59e850ea6852623d78c8b0af1a3cbae060.png)
