-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compare old/new plugin output for missing details #32
Comments
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:
The new plugin should provide this info in 1:1 form, or in a modified form that better communicates the details. |
Here is some live output from the v0.1.0 (and likely v0.1.1) release of the vCPUs allocation plugin:
The question is whether that format is any better. We don't explicitly note the The threshold values are shown in the Long Service Output in the web UI like so:
This seems like a fair compromise? |
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. |
As with several other plugins in this project, this one borrows heavily from existing projects. In particular, this plugin was initially based on a PowerShell / PowerCLI plugin I wrote in 2019. Doc updates have been applied, example usage has been added, including a command definition "contrib" file illustrating how the plugin would be referenced within a production Nagios configuration. Note: Some minor scratch notes from my attempt at crafting a combined age/size plugin are also included. Those notes mostly focus on my attempts to understand the process of determining the size of a snapshot using govmomi and the vSphere Web Services API. Partial work towards implementing snapshot size monitoring has also been included, though it is non-functional at this time. I hope to return to this once I understand how the vSphere API (through govmomi) can be used to reliably determine snapshot size information. Other small (unrelated) fixes have also been included, including some bad copy/paste/modify attempts in the README, doc comments, etc. - refs GH-4 - refs GH-32
Working on deploying updated plugins based on a build of current #69 provided a new plugin which omits the From a different service check: That's not included in the new plugin's output. EDIT: Probably easier to just include an entire line for completeness:
|
The $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
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? |
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 the top of my mind I'm thinking of the
CRITICAL
,WARNING
threshold details shown in the one-line summary output for the older plugins. That is useful to see why at a glance a Service Check state has been determined to be in a non-OK state.The text was updated successfully, but these errors were encountered: