Monitoring 'large' disks via SNMP?

I'm using net-mgmt/librenms with bsnmpd(1) and net-mgmt/bsnmp-ucd to remotely monitor our FreeBSD systems. The issue I've noticed is that the counters for disk usage are 32-bit, and overflow on 'large' (anything larger than 2TB) disks.

Does anyone know of a way to monitor disks of this size via SNMP? Except for SSDs, we don't have anything that's smaller than 2TB.
 
The trick we did for net-snmp (that is now included in its tree) is to:
Code:
blocksize * 2;
numblocks / 2;
...until numblocks fits in Integer32.

It's possible the same could be done for bsnmpd (I didn't look at the source yet).
 
Which OIDs are you querying? Quite a few have 64 bit counterparts these days.
 
The trick we did...
I hesitate to do this as disks won't appear as the proper size within LNMS then, which will only add to future confusion.

Which OIDs are you querying?
It's querying whatever the UCD SNMP module provides, which are 32 bit when I looked through their MIBs.

I'm thinking the only way to properly fix this is to submit patches to both the UCD module to add a new 'extended' OIDs for disk information that uses 64-bit counters, and then update LibreNMS to use these new OIDs instead of the old one. It requires patches on both ends which is a bit of a hassle, and I was kind of hoping there was something that already used larger counters, but it doesn't seem like it.

Edit: Actually it looks like this was already done on the UCD/net-snmp side of things, but LibreNMS doesn't use it. That should make things a little easier to get changed.
 
Back
Top