5 Replies Latest reply on May 4, 2018 9:08 AM by OsburnM

    Cluster Resources

    cgrvy Enthusiast

      Not sure if I'm going about this the right way. Using vROPS 6.7 we would like to create a dashboard showing the vCPU to pCPU ratio but taking into account N+1 redundancy on the clusters. What is the easiest approach when doing this?

       

      Following on from that - we have two sites with matching clusters per site. So we have a SAP cluster with 8 hosts per site. We would also like to read the amount of CPU in use in the opposite site and see if it fits in with our DR criteria, Again - what would be the best way of going about this - creating a load of supermetrics to read all the values - or is there a better way with policies?

       

      Thanks!

        • 1. Re: Cluster Resources
          OsburnM Enthusiast

          n+1 or "Metric | Cluster Configuration | DAS Configuration | Admission Control Policy | CPU Failover Resources Percent" ?

           

          I ask because with newer versions of vSphere you can now specify number of hosts and it will auto-set the CPU percentage.  So for a 16 node cluster where you want the cluster to survive 1 host, it will automatically set the resource percent to 6 (0.0625 -or- 1/16).  But if you set it to 2 host failures, it will auto set it to 13 (0.125 -or- 2/16).

          • 2. Re: Cluster Resources
            cgrvy Enthusiast

            That sounds good. Where do I specify that? Thanks.

            • 3. Re: Cluster Resources
              OsburnM Enthusiast

              Okay, so disclaimer-- I don't know if this is 100% correct, but the math works when I what checking it against some of my clusters.

               

              Assumptions-- it leverages the Admission Control CPU Failover Resources Percentage value to determine HA size.  So you need to make sure you're CPU percentage is set correctly if doing manually, or if you're using the new number of hosts failures features in the vSphere client.

               

              Here's the existing metrics I used to create the ratio metric:

               

              Cluster Compute Resource Object:

              Metrics|Cluster Configuration|DAS Configuration|Admission Control Policy|CPU Failover Resources Percent

              -> metric=configuration|dasConfig|admissionControlPolicy|cpuFailoverResourcesPercent

              -> this translates to the percentage defined at the cluster in vCenter for the % of cpu failover resources reserved.  in a 4-node cluster with 1 host failure protection, this number is 25.  In vrops it's presented as a straight integer of 25, so we need to convert it to a decimal to make it usable.  that's done in the formula & supermetric.  details below.

               

              Metrics|CPU|Number of physical CPUs (Cores)

              -> metric=cpu|corecount_provisioned

              -> this is the total number of physical cpu cores in the cluster (not including logical / hyperthreaded cores).  in a 4-node cluster with 2 socket, 12 cores, that's 96 total cores.

               

              Metrics|CPU|vCPUs Allocated on All VMs

              -> metric=cpu|vcpus_allocated_on_all_vms

              -> this is the total number of vcpus allocated to all VMs in the cluster.

               

              Formula:

              sum(a)/(t-(t*(r/100)))

               

              Formula Legend:

              t = total physical cpu cores

              r = cpu ha resource percent

              a - cpu allocation

               

              Supermetric Label:

              vCPU to Cores Allocation Ratio Including HA

              Supermetric Expression:

              (${this, metric=cpu|vcpus_allocated_on_all_vms})/(${this, metric=cpu|corecount_provisioned}-(${this, metric=cpu|corecount_provisioned}*(${this, metric=configuration|dasConfig|admissionControlPolicy|cpuFailoverResourcesPercent}/100)))

               

              Apply Cluster Computer Resource Object Type to the Supermetric.

              Enable the Supermetric in your policies.

              • 4. Re: Cluster Resources
                cgrvy Enthusiast

                Thanks for your effort on this. Confession - I'm not great with supermetrics - when i use your line of:

                 

                (${this, metric=cpu|vcpus_allocated_on_all_vms})/(${this, metric=cpu|corecount_provisioned}-(${this, metric=cpu|corecount_provisioned}*(${this, metric=configuration|dasConfig|admissionControlPolicy|cpuFailoverResourcesPercent}/100)))

                 

                what function do I use in front of this - and why do i have to use a function?

                 

                Also - is it possible to call multiple supermetrics in one supermetric?

                • 5. Re: Cluster Resources
                  OsburnM Enthusiast

                  Ha!  Well believe me, I'm pretty bad at them myself.  I'm sure there's better ways of what I'm doing but a) math sucks and b) I'm really just a bit lazy so I'll do my best to avoid doing a deeper dive.  lol

                   

                  So on to your questions... My understanding is that with the ( ) parenthesis and no prefix function qualifier, it assumes SUM.  You shouldn't have to put any function qualifier in the formula line-- just copy/paste what I have above and it should accept it.  If not, try putting 'sum' in front.

                   

                  As to you last question-- I don't know for sure but my guess is, that if it is possible, a supermetric is just another metric once it's been created so assuming it's enabled, as you're building the new supermetric, you should be able to select your object type that's associated with the first supermetric, then scroll down the metrics categories to the bottom where the supermetrics are and simply select it to add to your formula bar.

                   

                  ...or... just manually input the supermetric key (the ID that gets created for the metric and is visible to the right of the pane in the supermetrics section) if you're manually typing your formula.

                   

                  something like this to add two supermetrics together:  sum((${this, metric=supermetric|sm_id1})+(${this, metric=supermetric|sm_id2}))

                   

                  ...just a guess though.  not at a vrops interface to try it right now.