banshee/windows-collection/windows/snmp/
memory
The physical memory of a Windows, used and free, by SNMP
by banshee1 installation2 versions
Physical memory of a Windows, by SNMP
Returns the physical memory of a Windows: its size, what is used, what is free, and the share used. Two watches are proposed, each one set on the probe. The paging file is the collector windows/snmp/swap.
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
hrStorageRam(1.3.6.1.2.1.25.2.1.2), the one Windows calls "Physical Memory". The type is an OID, accepted with or without a leading dot. - The size and the used memory are the counts of allocation units times their size, in MiB; the free memory is the size minus the used; the share used is the used 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 | Physical memory | MiB | no |
used | Memory used | MiB | no |
free | Free memory | MiB | no |
used-percent | Memory used | % | no |
Watches
| Name | Title | Kind | Defaults | Checked by default |
|---|---|---|---|---|
used-percent | Memory saturated | above a threshold, on used-percent | warning above 90 %, critical above 95 %, for 3 runs | yes |
free | Little free memory | below a threshold, on free | critical below 512 MiB; no warning | no |
Limits
- "Used" is what the agent counts as used. Not yet checked on a real Windows: whether the standby list (the file cache Windows hands back on demand) counts as used there. If it does, a Windows that caches much looks fuller than it is; the thresholds of "Memory saturated" are then to be set higher on the probe.
- The agent serves no figure for the cache, the paged pool or the memory compressed: none of them can be returned here.