Talk:Collecting SNMP data from tables with arbitrary indexes
Subscribe

From OpenNMS

Jump to: navigation, search

Let me know what you think about...

Here we have the current new fantastic improvement for defining resources:

<resourceType name="hrStorageIndex" label="Storage (MIB-2 Host Resources)">
  <persistenceSelectorStrategy class="org.opennms.netmgt.collectd.PersistAllSelectorStrategy"/>
  <storageStrategy class="org.opennms.netmgt.collectd.IndexStorageStrategy"/>
</resourceType>
<group name="mib2-host-resources-storage" ifType="all">
  <mibObj oid=".1.3.6.1.2.1.25.2.3.1.3" instance="hrStorageIndex" alias="hrStorageDescr" type="string" />
  <mibObj oid=".1.3.6.1.2.1.25.2.3.1.4" instance="hrStorageIndex" alias="hrStorageAllocUnits" type="gauge" />
  <mibObj oid=".1.3.6.1.2.1.25.2.3.1.5" instance="hrStorageIndex" alias="hrStorageSize" type="gauge" />
  <mibObj oid=".1.3.6.1.2.1.25.2.3.1.6" instance="hrStorageIndex" alias="hrStorageUsed" type="gauge" />
</group>


Me, being the dreamer, someday, what I'd like to see us do something like this:

<resourceType name="hrStorageIndex" label="Storage (MIB-2 Host Resources)" mibObj=".1.3.6.1.2.1.25.2.3.1." >
  <persistenceSelectorStrategy class="org.opennms.netmgt.collectd.PersistAllSelectorStrategy"/>
  <storageStrategy class="org.opennms.netmgt.collectd.IndexStorageStrategy"/>
</resourceType>
<group name="mib2-host-resources-storage" ifType="hrStorageIndex">
  <instance="3" alias="hrStorageDescr" type="string" />
  <instance="4" alias="hrStorageAllocUnits" type="gauge" />
  <instance="5" alias="hrStorageSize" type="gauge" />
  <instance="6" alias="hrStorageUsed" type="gauge" />
</group>

Perhaps event let the resourceType have a mibobject tuple that is used to cross reference another index. Just some thoughts while this subject is fresh in DJ's mind ;-)