Network Management

SNMP returns a negative value when polling huge disk space on Windows

SNMP returns a negative value when polling huge disk volume on Windows. Symptom due to counter overruns.

First published date

10/30/2018 7:51 PM

Last published date

1/11/2022 2:32 AM

Overview

When polling the value for disk size (hrStorageSize), the value returns as negative. This happen because the counter overruns.

This issue should be presented to the vendor.

Product section

Network Performance Monitor

Cause

n/a

Resolution

Workaround:

  1. In UnDP, create a New Universal Device Poller.
  2. Search the OID for hrStorageSize .1.3.6.1.2.1.25.2.3.1.5.x (where 'x' is the disk number on the MIB branch).
  3. Select MIB Value Type: Counter.
  4. SNMP Get Type: GET.
  5. Polling Type: Node.
  6. Polling Interval: 10m.
  7. Keep Historical Data: yes.
  8. Status: Enabled.
  9. Create a 'Transform Results'
  10. Define the Transform (the Polling Interval should be the same of the UDP before: 10m)
  11. The formula:
    1. ('Int32-MaxValue'*2)-(-('SnmpNegativeReturn)))*AllocationUnits
    2. Int32-MaxValue - Max Value in a 32bit variable
    3. SnmpNegativeReturn - the OID that is returning a negative value
    4. AllocationUnits  - Size of the block allocation in the disk

Example: ((2147483647*2)-(-(-1366779137)))*4096 =11993858691072