- Oct 25, 2007
- 1,981
- 1
- 0
After many, many hours of trying to work around problems with Net-SNMP not reporting data which takes reserved space into account I finally just decided to submit a patch to Net-SNMP.org that would implement an additional datapoint. I was hoping there would be a few folks here that would be interested in giving the patch a test and leaving feedback on SourceForge.
If you aren't, you can probably stop reading now and I won't bore you with the details
https://sourceforge.net/tracker/?func=detail&aid=3558618&group_id=12694&atid=312694
Net-SNMP only reports Total size (hrStorageSize) and Used space (hrStorageUsed) on Linux systems. Unfortunately, using just these two datapoints means that monitoring software can't properly calculate true available space because there is no visibility for reserved space. This became an issue for us when drives were filling up and causing applications to cease functioning but no alerts were triggered from our monitoring software.
Many options were explored, but none were able to correct this issue reliably:
* Lower thresholds - No guarantees that reserved space is left at default.
* Modify calculation formula - Same issues as above, plus the monitoring software is closed source.
* Data Mine Reserved Space - Additional overhead and increased traffic.
* pass/pass_persist - Unable to convert OID value into volume name/type without running snmpget. Net-SNMP does not allow nested snmp queries so this fails. Storing this data in a readable file is unreliable due to the possibility of reindexing.
* Modify Net-SNMP source to return recalculated total - This was promising but I got stonewalled by office politics.
With that said, I settled on just putting together a patch that will add a new data point then work with the software vendor to get them to use this new data when available.
Basically all that it is doing is returning a new value for hrStorageAvail. This can then be used by monitoring software to calculate utilization levels that do take reserved space into account. The f_bavail value in the statfs struct is leveraged to return this value.
The patch was built against Net-SNMP 5.7.1. It might fail if you try it against older versions that didn't yet include the hrh_storage.c file.
Again, anyone that has some time to test it out and leave some feedback on the net-snmp patches page would be appreciated.
Thanks,
Bob
If you aren't, you can probably stop reading now and I won't bore you with the details
https://sourceforge.net/tracker/?func=detail&aid=3558618&group_id=12694&atid=312694
Net-SNMP only reports Total size (hrStorageSize) and Used space (hrStorageUsed) on Linux systems. Unfortunately, using just these two datapoints means that monitoring software can't properly calculate true available space because there is no visibility for reserved space. This became an issue for us when drives were filling up and causing applications to cease functioning but no alerts were triggered from our monitoring software.
Many options were explored, but none were able to correct this issue reliably:
* Lower thresholds - No guarantees that reserved space is left at default.
* Modify calculation formula - Same issues as above, plus the monitoring software is closed source.
* Data Mine Reserved Space - Additional overhead and increased traffic.
* pass/pass_persist - Unable to convert OID value into volume name/type without running snmpget. Net-SNMP does not allow nested snmp queries so this fails. Storing this data in a readable file is unreliable due to the possibility of reindexing.
* Modify Net-SNMP source to return recalculated total - This was promising but I got stonewalled by office politics.
With that said, I settled on just putting together a patch that will add a new data point then work with the software vendor to get them to use this new data when available.
Basically all that it is doing is returning a new value for hrStorageAvail. This can then be used by monitoring software to calculate utilization levels that do take reserved space into account. The f_bavail value in the statfs struct is leveraged to return this value.
The patch was built against Net-SNMP 5.7.1. It might fail if you try it against older versions that didn't yet include the hrh_storage.c file.
Again, anyone that has some time to test it out and leave some feedback on the net-snmp patches page would be appreciated.
Thanks,
Bob
