1 Reply Latest reply on Oct 12, 2012 6:02 PM by aLTeReGo

    feature request: snmp drive space monitor for freebsd?

    Term

      Is it possible to get a drive space monitor for freebsd?

       

      I can't use a simple snmp monitor to check drive space, because there are several values to check and some math to do.

       

      For example:

      I have to first look up the storage I want to monitor in hrStorageDescr (.1.3.6.1.2.1.25.2.1)  I want to monitor item 11.

      Then I have to look up the allocation units for this storage hrStorageAllocationUnits.11.  In this case, its 512.

      Next, I have to find the value for hrStorageSize.11 (.1.3.6.1.2.1.25.2.3.1.5.11).  In this case, its 2147483647.

      Last, the hrStorageUsed.11 (.1.3.6.1.2.1.25.2.3.1.6.11) is needed.  818737456.

       

      Now, we have to do the math.

      Storage size is calculated by multiplying the allocation units by the storage size value to get the number of bytes.  Then you have to divide by 1024 to get kb, divide that by 1024 to get MB, and again by 1000 to get a more readable GB value.  In this case we end up with 1000GB or 1TB.

       

      Repeat the same method with the storage used values, and then subtract the two to get the answer.  ~600GB free.

       

      Ideally, it would be possible for the user to plug in whatever oid was needed for each field, so it would work across almost everything.  The math should be the same everywhere.

       

      Thanks,

       

      Sean