banshee/windows-collection/windows/snmp/
swap
The virtual memory of a Windows, committed and free against its commit limit, by SNMP
by banshee1 installation2 versions
Virtual memory of a Windows, by SNMP
Returns the virtual memory of a Windows: its commit limit, what is committed, what is left, and the share committed. Two watches are proposed, each one set on the probe. The physical memory alone is the collector windows/snmp/memory.
How it works
The collector reads the table hrStorageTable of HOST-RESOURCES-MIB: hrStorageType (1.3.6.1.2.1.25.2.3.1.2), hrStorageAllocationUnits (.4, in bytes), hrStorageSize (.5) and hrStorageUsed (.6, both in allocation units).
- It keeps the first row of the type
hrStorageVirtualMemory(1.3.6.1.2.1.25.2.1.3), the one Windows calls "Virtual Memory". The type is an OID, accepted with or without a leading dot. - Windows counts physical memory and the paging file together in that row: its size is the commit limit of the system, and its used part is the memory committed. The collector returns them as they are.
- The figures are the counts of allocation units times their size, in MiB; the free virtual memory is the size minus the committed; the share committed is the committed over the size, rounded to a tenth.
- Nothing is skipped at the first run.
- An empty table, a table without that row, or a row of zero size stop the collector as misconfigured, and the message says how many rows were read and which types: never a green light without a measure.
Nothing is written to the Windows: SNMP reads only.
Prerequisites
- The SNMP service of Windows, installed and started: - on Windows Server, the feature "SNMP Service" (Server Manager, Add Roles and Features; or
Install-WindowsFeature SNMP-Servicein PowerShell); - on Windows 10 and 11, the optional feature "Simple Network Management Protocol (SNMP)" (Settings, Optional features; orAdd-WindowsCapability -Online -Name SNMP.Client~~~~0.0.1.0in PowerShell). - In the properties of the service "SNMP Service", tab Security: - a community with the right READ ONLY, which banshee reads in
protocol:snmp:v2c:community; - under "Accept SNMP packets from these hosts", the address of the poller. - SNMPv3: the SNMP agent of Windows does not offer it;
protocol:snmp:versionstaysv2c. The community then travels in clear text: keep it read-only and accepted from the poller alone. - The Windows firewall open to the poller on UDP 161 (the rule "SNMP Service (UDP In)").
Outputs
| Name | Label | Unit | Per instance |
|---|---|---|---|
total | Virtual memory | MiB | no |
used | Virtual memory committed | MiB | no |
free | Free virtual memory | MiB | no |
used-percent | Virtual memory committed | % | no |
Watches
| Name | Title | Kind | Defaults | Checked by default |
|---|---|---|---|---|
used-percent | Virtual memory saturated | above a threshold, on used-percent | warning above 85 %, critical above 95 %, for 3 runs | yes |
free | Little free virtual memory | below a threshold, on free | critical below 1024 MiB; no warning | no |
Limits
- The SNMP agent of Windows does not serve the paging file alone: neither its size nor its use can be returned here. What is returned is the virtual memory as a whole, physical memory included.
- A paging file that Windows grows on demand raises the commit limit as it grows: the share committed can fall while the memory committed rises.
- Not yet checked on a real Windows: that the row "Virtual Memory" of the agent is the commit limit and the commit charge, as described above. It is the behaviour known of the agent, not one seen on a target.