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
| Key | Name | Unit | Default limits |
|---|---|---|---|
used_pct | Space used | % | warning above 85, error above 95 |
free_bytes | Free space | B | none |
total_bytes | Total size | B | none |
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
| Parameter | Default | Meaning |
|---|---|---|
storage_index | required | hrStorageIndex when the entry was added. |
storage_descr | required | hrStorageDescr, a mount point such as /var or a drive such as C:\. This is the identity that survives renumbering. |
port | 161 | UDP 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
| Message | Meaning |
|---|---|
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 errors | As for snmp_interface. |