The problem: Windows storage volumes are mislabeled with an extra backslash, and no longer update after enabling WMI.
- force rediscover - This check only occurs when parsing fixed local disks on Windows systems via WMI, and will always rediscover unless the mismatch between SNMP and WMI is corrected.
- mib_name check - I was unaware if an earlier Microsoft or third party SNMP agent exposed ucd or another mib, and did that just in case.
- net-snmp escapes output - All SNMP responses suffer an additional level of escaping, you can easily watch backslashes double in fields like sysContact.
Full output from running discovery -d -m storage, poller -d -m storage, and poller -d -m wmi is attached, before and after changing stripslashes, along with output from the storage table and rrd filenames.
In the case of hrStorageDescr, the escaping backslash from SNMP is escaped again along with the intended backslash, then passed into the database storage_descr field, so both the web interface incorrectly displays these volumes as
and the rrd filenames updated by the SNMP storage module contain an extra underscore to match. However, the first WMI storage pass disables the SNMP storage module and those files are no longer updated, as WMI updates the shorter rrd filenames as C:\, F:\, and I:\.
Notable debug output from a storage discovery, storage poll, and wmi poll:
HOST-RESOURCES-MIB 31 -> 1, hrStorageFixedDisk, HOST-RESOURCES-MIB, C:\\ Label: Serial Number 46877b75, 4096, 498630389760, 276420460544, 0
|
SQL[UPDATE `storage` set `storage_descr` ='C:\\\\ Label: Serial Number 46877b75' WHERE `storage_id` = '1']
|
RRD CMD[update /opt/observium/rrd/hyperv0/storage-host-resources-mib-C____Label___Serial_Number_46877b75.rrd N:276420460544:222209929216]
|
RRD CMD[update /opt/observium/rrd/hyperv0/storage-host-resources-mib-C___Label___Serial_Number_46877b75.rrd N:276420460544:222209929216]
|
Only the first rrd is referenced in the web interface, and only the second is updated on subsequent polls.
Stripping the extra backslash from SNMP at the start corrects these problems, so the web interface shows Windows volumes without the extra backslash, as C:\, F:\, and I:\, and both the storage and wmi poller modules use identical rrd filenames, preventing a loss of data when changing the polling method.
Debug output from the same commands after stripslashes():
HOST-RESOURCES-MIB 31 -> 1, hrStorageFixedDisk, HOST-RESOURCES-MIB, C:\ Label: Serial Number 46877b75, 4096, 498630389760, 276341080064, 0
|
SQL[UPDATE `storage` set `storage_descr` ='C:\\ Label: Serial Number 46877b75' WHERE `storage_id` = '1']
|
RRD CMD[update /opt/observium/rrd/hyperv0/storage-host-resources-mib-C___Label___Serial_Number_46877b75.rrd N:276341080064:222289309696]
|
RRD CMD[update /opt/observium/rrd/hyperv0/storage-host-resources-mib-C___Label___Serial_Number_46877b75.rrd N:276341080064:222289309696]
|
Fixed in r6807.