Aaarrggh!
As of ROS 6.36, Mikrotik fixed the SNMP bug described here.
However, if you're still using the "old" Dude (possibly also the new Dude, haven't checked it), and you have a network running mixed releases (some before 6.36, some 6.36 and after), their fix broke you -- you're going to see nonsense values or probe failures on one or the other set of routers in your network.
The solution is yet different code for the functions: code that searches for both strings and uses whichever one is present. (It adds 1 to the sum because the one that is NOT present will return -1.)
mem_size:
oid
(concatenate
("iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageSize.",
array_element
(oid_column
("iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageIndex", 600),
array_find
(oid_column
("iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageType", 600),
"iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTypes.hrStorageRam"
)
+ array_find
(oid_column
("iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageType", 600),
"iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTypes.hrStorageOther"
)
+ 1
)
)
)
mem_usage:
oid
(concatenate
("iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageUsed.",
array_element
(oid_column
("iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageIndex", 600),
array_find
(oid_column
("iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageType", 600),
"iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTypes.hrStorageRam"
)
+ array_find
(oid_column
("iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageType", 600),
"iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTypes.hrStorageOther"
)
+ 1
)
)
) * 100 / mem_size()
Once all your routers are running 6.36 or above, you can return to the original Dude function code.