VMware Cloud Community
sxnxr
Commander
Commander

Vrops Rest API and average over a time period

Bit of background

We are using vrops for are automation (Ansible) placement and part of that is the datastore to deploy onto. We currently are looking at the remaining capacity stat and if the VM being deployed to that datastore is equal to or greater than the remaining then skip and check the next and so on. Now that worked ok in the past because we were limited to 2tb datastores ( dont ask). We are now moving to NFS (netapp) mounts which are all thin disks and also 25tb is size.

My concern is that we can use that simple method anymore and need to take into consideration other metrics like latency and IO etc.

So my thinking is use the rest calls into vrops to get an average over x period for latency etc.

Has anyone dont anything like this, can this be done and any advice if there is a better way to do it.

0 Kudos
2 Replies
jasnyder
Hot Shot
Hot Shot

I haven't dug through this in depth or anything, so I don't know if an average for what you're looking for exists out of the box in vROPS.  But you could create a super metric for each of the averages you want and let vROPS compute that for you as it collects.  Then all you have to do is query that super metric on the datastores you're interested in.  It should be fairly easy to create, and I believe you can set the period you want it to average over (i.e. past X collection cycles).  The REST calls to grab metrics are pretty simple if you're just trying to grab basic vCenter objects like datastores.

sxnxr
Commander
Commander

Looking at the supermetric function avg i cant find much info other than it is the average. Anyone know what time frame this is over and can i specify it?

0 Kudos