Skip to content

SNMP disk space (snmp_disk) ​

Reads one entry of the Host Resources storage table (hrStorageTable) over SNMP and reports how full it is, and its free and total size. Discovery adds one sensor for each fixed disk the agent lists.

Channels ​

KeyNameUnitDefault limits
used_pctSpace used%warning above 85, error above 95
free_bytesFree spaceBnone
total_bytesTotal sizeBnone

Sizes are hrStorageSize and hrStorageUsed multiplied by hrStorageAllocationUnits. An entry of size zero reports an unknown percentage. The agent does not report the blocks a file system reserves for root, so they count as free here: the used percentage is a little lower, and the free space a little higher, than the ssh_disk sensor shows for the same file system, which follows df. A tmpfs such as /tmp, /run or /dev/shm is not proposed by discovery, although the agent lists it as a fixed disk; add one by hand if you want it.

Parameters ​

ParameterDefaultMeaning
storage_indexrequiredhrStorageIndex when the entry was added.
storage_descrrequiredhrStorageDescr, a mount point such as /var or a drive such as C:\. This is the identity that survives renumbering.
port161UDP port of the SNMP agent.

Suggested interval: 300 seconds. Credential: SNMP.

If the entry at storage_index no longer has the description, the sensor walks the table and uses the one entry that does, and says so in the message. If none or several have it, the poll fails and the sensor needs review.

Discovery ​

For a device whose agent lists fixed disks (hrStorageFixedDisk), discovery proposes one disk sensor for each that has a size. It leaves out pseudo and container filesystems (/run, /dev, /sys, /proc, /snap, /var/lib/docker and similar), proposes one entry for a group of entries with the same size and use (bind mounts and subvolumes of the same filesystem list themselves many times over), and stops at twelve.

On the target ​

An SNMP agent with read access to HOST-RESOURCES-MIB. See SNMP setup. Note that an agent reads the table by running statfs on every mount, and one stalled network mount can make it slow.

Failures ​

MessageMeaning
the storage entry "..." is no longer listed by the device (kind protocol)Removed or renamed.
N storage entries are now described as "..." (kind protocol)Ambiguous; the sensor will not guess.
the device reports no size or usage for storage entry ... (kind protocol)The entry has no size objects.
SNMP errorsAs for snmp_interface.

AGPL-3.0-only