Contributor
Contributor

Creating forumals on past data.

I have an interesting scenario

 

We have a number of hosts and on the hosts we have certain virtual machines that are classified as overhead machines.  Backup servers, Antivirus, etc, just a collection of VM that we need to run the environment.

Its easy enough to grab the statistics for the total CPU/MEM/DISK for the entire cluster and easy enough to grab the stats for the collection of virtual machines.

What I want to do is deduct the overheads from the totals, this will give me what actually I have available for the business.

I could create a super metric, but when creating that and applying it, I need to wait for it to collect that statistic, in our case we report monthly, so I need to wait some time to see this stat and if I get it wrong, wasted time.

 

Whats the best way of going about this?  Is there a way I can run formulas on existing data?  the data is already there, I just want to run some formulas over the top of it and present this in pretty boxes for management 🙂

Thanks

Scott

0 Kudos
3 Replies
Hot Shot
Hot Shot

A super metric is just a mathematical formula that works on the current data. AFAIK you can't create it on "old" data. That's why I don't fully understand why you have to wait.... maybe share your SM?

 

You can build a SM with a where condition. Perhaps you can filter out those VM's: 

https://code.vmware.com/samples/6185

 


Was I helpful? Give a kudo for appreciation!
Braindumping @ http://kablog.nl/
Tweeting @ https://twitter.com/_Kabir_Ali_
0 Kudos
Contributor
Contributor

Hey there

I guess the difficult thing about a super metric is that when you create it and enable it .. thats when it starts collecting so you have to wait.

If you wanted to run custom formulas on previous data, I cant see a way of doing that.

I am not opposed to creating the metric, most of the time what I need would be static.  I am probally overthinking it.

So under the vCenter Adapter - Cluster Compute Resource, select the cluster and hit Metric - CPU - Total Capacity (MHZ), that give me a number in mhz.

I have created a group and updated the membership with the Overhead VMs

I have attached a simple supermetric to that group - sum(Virtual Machine: CPU|Total Capacity)

If the virtual machine is a member of the group, tally it up.

The bit I am struggling with is how to sub one from the other, that will be my magic 'whats available to be used' by the business.

Untitled1.png

 

 

 

 

 

0 Kudos
Hot Shot
Hot Shot

I think your challenge is with the depth. For VMs you will need 2 to get to the cluster, while for hosts you need 1.

My approach would be to create 2 custom groups. 1 with a (dynamic) filter to select the VMs to exclude. The second custom group will contain all the hosts from which you want to calculate the CPU MHz.

Create a SM for the first custom group. Something like sum(virtualmachine:cpu|demand(MHz)). Set the depth of 2 and assign that SM to the environments.

Create the 2nd SM. Something like sum(HostSystems:CPU|Total(MHz) with a depth of 1. Also assign that SM to the environments.

Then create the 3rd SM. Something like sum(SM2) - sum(SM1). And assign that the clusters.

My test environment is down so this is from the top of my head. Maybe you need to tweak here and there.


Was I helpful? Give a kudo for appreciation!
Braindumping @ http://kablog.nl/
Tweeting @ https://twitter.com/_Kabir_Ali_
0 Kudos