POLA violation: snmp renumbering stuff

For some reason, my locally installed snmp daemon decided to renumber the elements in the hrStorageTable, meaning all the attached disks were being either misreported or just plain dropped from my graphs (/mrtg/blue/index.html). Not that the new numbering doesn’t make sense but I didn’t know this was going to happen.

How to discover and fix it? snmptable is your friend. Any MIB element that is included in a table can be displayed with the entire table, making it easy to see what’s available for monitoring.

As shown here, the memory used by the kernel is listed first, followed by the disks. The disks were numbered starting at 1 before . . . . .

[/www/mrtg/blue]# snmptable -c blue hrStorageTable
SNMP table: HOST-RESOURCES-MIB::hrStorageTable

 hrStorageIndex                                hrStorageType hrStorageDescr hrStorageAllocationUnits hrStorageSize hrStorageUsed hrStorageAllocationFailures
              1         HOST-RESOURCES-TYPES::hrStorageOther Memory Buffers                256 Bytes             ?           192                           0
              2           HOST-RESOURCES-TYPES::hrStorageRam    Real Memory               4096 Bytes             ?          3241                           ?
              3 HOST-RESOURCES-TYPES::hrStorageVirtualMemory     Swap Space               4096 Bytes             ?         19625                           ?
              4     HOST-RESOURCES-TYPES::hrStorageFixedDisk              /               1024 Bytes             ?         83592                           ?
              5     HOST-RESOURCES-TYPES::hrStorageFixedDisk           /usr               1024 Bytes             ?       3639961                           ?
              6     HOST-RESOURCES-TYPES::hrStorageFixedDisk           /var               1024 Bytes             ?          8015                           ?
              7     HOST-RESOURCES-TYPES::hrStorageFixedDisk          /proc               4096 Bytes             ?             1                           ?
              8     HOST-RESOURCES-TYPES::hrStorageFixedDisk     /usr/ports                512 Bytes             ?      35548516                           ?