Skip to content

VMware virtual machine (vmware_vm) ​

Reads one virtual machine through the vSphere API with a read-only account, from an ESXi host or vCenter: power state, the health vSphere gives it, CPU, memory, disk space, uptime and the disk and network rates. Set up the account and the certificate as in VMware vSphere.

What it looks like ​

The page of a vmware_vm sensor in the light theme

The sensor's page after a few polls, reading a small virtual machine on a free ESXi 8.0 host. In the dark theme: the sensor's page. The form for adding it, with its parameters filled in: light, dark.

Parameters ​

ParameterDefaultMeaning
vmrequiredThe machine's name in the vSphere inventory. It is found wherever it runs, so a migration does not break the sensor.
expect_runningtrueThe sensor is Down when the machine is not powered on. Turn off for a machine that is off most of the time.
port, verify_tls, tls_fingerprint443, true, noneAs for the host.

Channels ​

KeyNameUnitDefault limits
power_statePower statenone1 powered on, 0 powered off, 2 suspended (warning), 3 other (warning)
connectedConnectednoneDown when the host cannot reach the machine (0)
overall_statusHealthnone0 green, 1 yellow (warning), 2 red (down), 3 gray (warning)
cpu_pctCPU%warning above 90. No error limit: a machine that uses all of its CPUs for a while is busy, not broken.
cpu_used_mhzCPU usedMHznone
mem_used_pct, mem_used_bytesMemory used (guest)%, Bwarning above 90, error above 97 for the percentage
mem_host_bytesMemory held on the hostBnone
mem_total_bytesMemory configuredBnone
disk_used_bytesDisk space usedBnone
disk_provisioned_bytesDisk space provisionedBnone
uptime_sUptimesnone
disk_read_bps, disk_write_bpsDisk read, writeB/snone
net_in_bps, net_out_bpsNetwork in, outbit/snone
api_msAPI response timemsnone

The sensor finds the machine by name, reads its properties, and for a powered-on machine asks the performance manager for the latest 20-second sample of four counters. The first poll also reads the list of counters (about 175 KB on an ESXi host), whose identifiers it keeps for the next polls.

  • CPU is the machine's use in MHz over the most it may use (its virtual CPUs at the host's clock speed, or its limit), so one virtual CPU at full load on a four-CPU machine reads 25.
  • Memory used is what vSphere calls guest memory: the part of the configured memory the guest touched recently (the "active" figure of the interface). It is not what the guest's own tools report, and it is usually lower than the memory the guest operating system shows as used. Memory held on the host is what the host spent on the machine, which is more telling about pressure on the host.
  • Disk space used is what the machine's files take on the datastores (committed), and provisioned adds what its thin disks could still grow into. The size of the filesystems inside the guest needs the guest's tools and is not read.
  • The rates are the aggregate over the machine's virtual disks and network adapters, in bytes and bits per second, from the real-time sample vSphere keeps for the last hour. They are unknown for a machine that is off, and for a counter vSphere has no sample of yet. Network counters are unknown for a machine with no adapter. An account that may not read performance data leaves them unknown and the message says so; the other channels are unaffected.
  • Power state. A machine that is not powered on is Down unless expect_running is off; its CPU, memory in use, uptime and rates are unknown, but its disk space is still known. A suspended machine is Down while expect_running is on. A machine whose connection state is not "connected" (orphaned, inaccessible) is Down whatever is expected. The overall status follows vSphere's alarms, as for the host.

Suggested interval 60 seconds. The name is matched exactly; names with spaces, punctuation or non-ASCII letters work.

AGPL-3.0-only