Companion to the Grafana dashboard in this gist. Collects and alerts on VMware CPU Readiness (the percentage form of CPU Ready) per vCPU.
CpuRdinessAvg is collected in hundredths of a percent (VMware's convention
for percentage perf counters, same as cpu.usage). Validated on a live lab against
the summation counter: CpuRdinessAvg / 100 == CpuRdySum / 20000 * 100.
| You want | Raw value to use |
|---|---|
| 5% per vCPU | 500 |
| 10% per vCPU | 1000 |
So thresholds use 500 / 1000, and any graph divides by 100.
< 5%healthy ·5–10%investigate (warning) ·> 10%contention (critical)- Tiers are per vCPU. A 4-vCPU VM at "10% aggregate" is only 2.5% per vCPU.
| File | Goes in | Purpose |
|---|---|---|
vmware-cpu-readiness-thresholds.xml |
merge <group> into etc/thresholds.xml |
the two high thresholds (5% / 10%) |
vmware-cpu-readiness-thresd-configuration.xml |
merge <package> into etc/thresd-configuration.xml |
wires the group to the VMware-VirtualMachine service |
vmware-cpu-readiness.events.xml |
etc/events/ + reference in etc/eventconf.xml |
gives the custom UEIs proper severity + auto-clearing alarms |
vmware-readiness-percent.properties |
etc/snmp-graph.properties.d/ |
OpenNMS resource graph in true % (CDEF /100) |
ds-typeisvmware7Cpu(this lab's vCenter API generation). Change tovmware6Cpu/vmware8Cputo match the resource type your environment actually produces — check a VM's resource IDs first.
- Merge the
<group>and<package>snippets into the respective files. - Copy
vmware-cpu-readiness.events.xmltoetc/events/and add<event-file>events/vmware-cpu-readiness.events.xml</event-file>toeventconf.xml. - Drop
vmware-readiness-percent.propertiesintoetc/snmp-graph.properties.d/. - Reload the daemons (no restart needed):
/opt/opennms/bin/send-event.pl uei.opennms.org/internal/reloadDaemonConfig --parm 'daemonName Eventd'
/opt/opennms/bin/send-event.pl uei.opennms.org/internal/reloadDaemonConfig --parm 'daemonName Threshd'
/opt/opennms/bin/send-event.pl uei.opennms.org/internal/reloadDaemonConfig --parm 'daemonName Collectd'thresholding-enabled=true is already set on the VMware services in
collectd-configuration.xml, so no change is needed there.
trigger="3"at the 300s collection interval = the value must stay high for ~15 minutes before firing. Lower to1for immediate alerts (noisier), raise for longer sustain.rearmsits one tier belowvalue(4% / 8%) to avoid flapping.- Each sample is a single 20-second realtime window sampled every 5 minutes, so very brief sub-minute spikes between samples won't be seen — fine for sustained contention, not for catching micro-bursts.
Assisted by Anthropic Claude Opus 4.8