Giter VIP home page Giter VIP logo

Comments (6)

atc0005 avatar atc0005 commented on June 12, 2024

As an example, here is what the PowerCLI plugin uses with its one-line summary (not the whole output string):

$usageLevelSummary = "vCPU allocation for powered VMs is $($vCPUsPercentageUsedOfAllowed)% of $($MaxVCPUsAllowed) ($($vCPUsRemaining) remaining) [WARNING: $($WarningUse)% , CRITICAL: $($CriticalUse)%]"

and here is real production output for the VMs in a specific resource pool:

OK: vCPU allocation for powered VMs is 70% of 20 (6 remaining) [WARNING: 95% , CRITICAL: 97%]

The new plugin should provide this info in 1:1 form, or in a modified form that better communicates the details.

from check-vmware.

atc0005 avatar atc0005 commented on June 12, 2024

Here is some live output from the v0.1.0 (and likely v0.1.1) release of the vCPUs allocation plugin:

OK: 14 vCPUs allocated (70.0%): 6 more remaining from 20 allowed (evaluated 5 VMs, 1 Resource Pools)
OK: 115 vCPUs allocated (71.9%): 45 more remaining from 160 allowed (evaluated 61 VMs, 4 Resource Pools)

The question is whether that format is any better. We don't explicitly note the WARNING and CRITICAL thresholds in the one-line summary, but we do list how many VMs have been evaluated, how many Resource Pools. The hope is that having that right there in the summary will help to pinpoint configuration issues more quickly vs a reminder what the thresholds are.

The threshold values are shown in the Long Service Output in the web UI like so:

Service State Information
Current Status:	  OK   (for 0d 15h 5m 4s)
Status Information:	OK: 115 vCPUs allocated (71.9%): 45 more remaining from 160 allowed (evaluated 61 VMs, 4 Resource Pools)

**ERRORS**

* None

**THRESHOLDS**

* CRITICAL: 100% of 160 vCPUs allocated
* WARNING: 97% of 160 vCPUs allocated

**DETAILED INFO**

* vCPUs
** Allocated: 115 (71.9%)
** Max Allowed: 160

This seems like a fair compromise?

from check-vmware.

atc0005 avatar atc0005 commented on June 12, 2024

One thing not clearly noted is whether the evaluated VMs are powered on or not. That's not noted in the one-line summary or the Long Service Output listing.

This should probably be noted for all plugins which allow filtering on power status. The same goes for any other explicit evaluation criteria toggled by the sysadmin configuring the service check command definition. Choices there should be explicitly noted in the Long Service Output, if not in the one-line summary.

from check-vmware.

atc0005 avatar atc0005 commented on June 12, 2024

Working on deploying updated plugins based on a build of current master branch. The work from #107 in particular is up for extended testing.

#69 provided a new plugin which omits the [WARNING: 97% , CRITICAL: 99%] values displayed by the PowerCLI plugin. Not sure yet if that is a "problem".

From a different service check: 0.96% of total capacity.

That's not included in the new plugin's output.

EDIT:

Probably easier to just include an entire line for completeness:

OK: Memory usage is at 93.89% of 40 GB allowed (2.45 GB remaining), 0.96% of total capacity. [WARNING: 101% , CRITICAL: 110%]

from check-vmware.

atc0005 avatar atc0005 commented on June 12, 2024
OK: Memory usage is at 93.89% of 40 GB allowed (2.45 GB remaining), 0.96% of total capacity. [WARNING: 101% , CRITICAL: 110%]

The 0.96% of total capacity remark seems to be computed using these bits of PowerCLI logic:

$poolDetails = @{
    "name" = $_.Name;
    "cpuActive" = ($_.Runtime.Cpu.OverallUsage / 1000);
    "memoryConsumed" = ($_.Runtime.Memory.OverallUsage / 1GB)
    "memoryTotal" = ($_.Runtime.Memory.MaxUsage / 1GB)
}

and

# This property is attached to each entry in the pool; fetch value from first
# array entry.
if ($detailedPools.Count -gt 0) {
    $totalMemoryAvailable = $detailedPools[0].memoryTotal
}

$memoryPercentageAllowed = [math]::Round(($totalMemoryUsed / $MaxMemoryAllowed) * 100, 2)
$memoryPercentageTotalCapacity = [math]::Round(($totalMemoryUsed / $totalMemoryAvailable) * 100, 2)
$memoryRemaining = [math]::Round(($MaxMemoryAllowed - $totalMemoryUsed), 2)

Per the Data Object - ResourcePoolResourceUsage(vim.ResourcePool.ResourceUsage) doc, this is what the maxUsage field is about:

NAME TYPE DESCRIPTION
maxUsage xsd:long Current upper-bound on usage. The upper-bound is based on the limit configured on this resource pool, as well as limits configured on any parent resource pool.

It may be that I was able to compute the total memory available in the cluster due to the memory limit on the pool being unlimited? This doesn't seem like a reliable way to list the overall percentage of memory consumed from the cluster. Instead you'd have to get the list of hosts, tally the total memory, then calculate per pool and in aggregate.

If there are pool caps, that would need to factor in somehow?

from check-vmware.

atc0005 avatar atc0005 commented on June 12, 2024

The question is whether that format is any better.

I'm biased, but I like the new format better. Overall I think I've met the original intent for this issue, so I'm consider it resolved. #110 was spun off to handle testing the addition of reporting the percentage of memory used from total cluster capacity, and I can spin off new issues for anything not already covered.

Considering this resolved.

from check-vmware.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.