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

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

chris_nelson
Guide

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!



1 REPLY 1

wolfgang_beer
Dynatrace Champion
Dynatrace Champion

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