Forum Discussion

Andy_Domeier's avatar
11 years ago

Standard "Percent Used" Datapoints for Graphs (Mem and CPU)

Today to create a graph that shows you trends for overall memory and CPU utilization as a percent of total available it\'s a lot of custom work. I think this is a very standard and important datapoint that should be a default for all hosts. An example of this is on our Orchestration app servers we have to use the following datapoints to produce a graph that shows % used for memory and/or CPU

(this is just for one host in the cluster)

3 normal datapoints: (All NetSNMPMem)
AvailableReal
Cached
Total Real

2 Virtual Datapoints:
"
Used" = Total - Avail - Cached
"% Used" = 100*"Used"/Total

I think it would be really useful to make this a default data point so that you can trend total used overtime as a percent without having do to this math for every host. I looked around to see if I was doing this in an awkward way and it looks like this is the right way to do it.

Thanks!

  • Hey Andy - can you explain your needs a little more?  Our standard CPU and memory graphs do these calculations for you, and you can view them over any time period you want to see trends.  Are you talking about making a single graph showing both? Or some other use case?

  • Hey Steve, Great point, I did a terrible job of articulating that this is when I'm consolidating multiple hosts into one graph. This is a really valuable graph when I have a cluster of servers to have them all on the same graph. An example would be the consolidated CPU and Mem graphs out in our dashboard on THE Dashboard in our account. Does that make sense? It's absolutely possible I'm missing something but it looked like Support didn't have a good solution for getting multiple hosts consolidated onto one graph for that data.

  • Thanks Andy. You can always add to the standard datasource - e.g. you can add a complex datapoint to the datasource called, say, ActiveMemoryPercent, using this expression:
    (TotalReal - AvailReal - Cached)/TotalReal*100

    Then you can just use a single datapoint in your dashboard graphs.

    [Actually, Ill add that to our standard datasource. We didn't initially, as otherwise people will be tempted to alert on it - but its often correct to have Active Memory be very high - databases and Java apps are often sized to use almost all memory. So long as there is no sustained swapping, its not an issue. But I digress...]

    Anyway, using the complex datapoint approach will make creating dashboards easy - the only disadvantage is that you will only get data from the point when you create the datapoint onwards. The calculated graph data points show data from whenever the underlying metrics were collectored...

    LMK if you want me to do that for your account - or you will be able to import from our standard core repository to get that change - but only after your account is updated to next release (as our core repository already has been.)