Comments (6)
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.
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.
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.
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.
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.
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)
- Build dev/stable releases using go-ci Docker image
- RPM installation output is "saw-toothed" and "noisy"
- Add support for excluding/ignoring VMs by `Folder` Managed Object ID (MOID) HOT 3
- Add support for excluding/ignoring VMs by Custom Attribute
- Add support for ignoring list of hostnames to the `check_vmware_hs2ds2vms` plugin
- Create plugin to list Virtual Machines in order to test include/exclude options HOT 1
- Evaluate consistency of terminology regarding VM collections HOT 4
- Replace hard-coded flag names with constants HOT 2
- `vsphere.FilterVMsByX` functions have inconsistent return values HOT 1
- Update help text for include/exclude RP flags to emphasize filtering by name HOT 1
- Add support for unescaping URL encoded VirtualMachine names HOT 1
- Create plugin to monitor age of VM templates
- Add support for including/excluding resource pools by Managed Object ID (MOID)
- Add support for including/excluding resource pools by cluster HOT 1
- Add support for including/excluding virtual machines by name
- `gosec` `G601: Implicit memory aliasing in for loop` linting errors
- Refactor objects tally logic used to provide plugin "trailer" summary details HOT 1
- Update datastore plugins to indicate which VMs within datastore are templates
- Add virtual machine templates count to common report "trailer", metrics? HOT 1
- Update `vsphere.VMwareAdminAssistanceNeeded` annotation to point sysadmins to plugin doc HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from check-vmware.