Gianpietro Lavado
2017-07-02 22:28:59 UTC
Hi,
Has anyone achieved these kind of collection while showing card names
(entPhysicalName) and automatically dealing with arbitrary indexes?
For distributed memory, NMS-8484 enhancement does the trick, since both
statistics and names tables use the same index some how:
<resourceType name="entPhysicalEntry" label="Cisco Physical Entity"
resourceLabel="${entPhysicalName} (index ${index})">
<persistenceSelectorStrategy
class="org.opennms.netmgt.collection.support.PersistAllSelectorStrategy" />
<storageStrategy
class="org.opennms.netmgt.collection.support.IndexStorageStrategy" />
</resourceType>
<resourceType name="cempMemPoolEntry" label="Cisco XR Memory Pool"
resourceLabel="Card ${entPhysicalName} Pool ${poolNumber} (index ${index})">
<persistenceSelectorStrategy
class="org.opennms.netmgt.collectd.PersistRegexSelectorStrategy">
<parameter key="match-expression" value="(#poolNumber = '1')" />
</persistenceSelectorStrategy>
<storageStrategy
class="org.opennms.netmgt.collection.support.IndexStorageStrategy" />
</resourceType>
<group name="entPhysicalTable" ifType="all">
<mibObj oid=".1.3.6.1.4.1.14179.2.2.1.1.3" instance="entPhysicalEntry"
alias="entPhysicalName" type="string" />
</group>
<group name="cempMemPoolTable" ifType="all">
<mibObj oid=".1.3.6.1.4.1.9.9.221.1.1.1.1.18"
instance="cempMemPoolEntry" alias="cempMemPoolHCU" type="Gauge32" />
<mibObj oid=".1.3.6.1.4.1.9.9.221.1.1.1.1.20"
instance="cempMemPoolEntry" alias="cempMemPoolHCF" type="Gauge32" />
<property instance="cempMemPoolEntry" alias="entPhysicalName">
<parameter key="source-type" value="entPhysicalEntry" />
<parameter key="source-alias" value="entPhysicalName" />
<parameter key="index-pattern" value="^(.+)\.\d+$" />
</property>
<property instance="cempMemPoolEntry" alias="poolNumber"
class-name="org.opennms.netmgt.collectd.IndexSplitPropertyExtender">
<parameter key="index-pattern" value="^.+\.(\d+)$" />
</property>
</group>
However, when it comes to distributed CPU, *entPhysicalName* uses
*cpmCPUTotalPhysicalIndex* as its index, so statistics and names tables do
not share the same index. There is a proposed enhancement in NMS-8484 that
could deal with this through a class called
"org.opennms.netmgt.collectd.ColumnPropertyExtender", but it seems it was
never merged.
I was trying to apply the same strategy as above, but grabbing the
entPhysicalName from the *value* of cpmCPUTotalPhysicalIndex, like this:
<group name="cpmCPUTotalTable" ifType="all">
<mibObj oid=".1.3.6.1.4.1.9.9.109.1.1.1.1.8"
instance="cpmCPUTotalEntry" alias="cpmCPUTotal5" type="Gauge32" />
<mibObj oid=".1.3.6.1.4.1.9.9.109.1.1.1.1.2"
instance="cpmCPUTotalEntry" alias="cpmCPUTotalPhysicalIndex" type="string"
/>
<property instance="cpmCPUTotalEntry" alias="entPhysicalName"*
class-name="org.opennms.netmgt.collectd.ColumnPropertyExtender"*>
* <parameter key="column-index" value="cpmCPUTotalPhysicalIndex" />*
<parameter key="source-type" value="entPhysicalEntry" />
<parameter key="source-alias" value="entPhysicalName" />
</property>
</group>
Any ideas?
Thanks,
Gianpietro
I would really appreciate any pointer to solving this kind of issue.
Has anyone achieved these kind of collection while showing card names
(entPhysicalName) and automatically dealing with arbitrary indexes?
For distributed memory, NMS-8484 enhancement does the trick, since both
statistics and names tables use the same index some how:
<resourceType name="entPhysicalEntry" label="Cisco Physical Entity"
resourceLabel="${entPhysicalName} (index ${index})">
<persistenceSelectorStrategy
class="org.opennms.netmgt.collection.support.PersistAllSelectorStrategy" />
<storageStrategy
class="org.opennms.netmgt.collection.support.IndexStorageStrategy" />
</resourceType>
<resourceType name="cempMemPoolEntry" label="Cisco XR Memory Pool"
resourceLabel="Card ${entPhysicalName} Pool ${poolNumber} (index ${index})">
<persistenceSelectorStrategy
class="org.opennms.netmgt.collectd.PersistRegexSelectorStrategy">
<parameter key="match-expression" value="(#poolNumber = '1')" />
</persistenceSelectorStrategy>
<storageStrategy
class="org.opennms.netmgt.collection.support.IndexStorageStrategy" />
</resourceType>
<group name="entPhysicalTable" ifType="all">
<mibObj oid=".1.3.6.1.4.1.14179.2.2.1.1.3" instance="entPhysicalEntry"
alias="entPhysicalName" type="string" />
</group>
<group name="cempMemPoolTable" ifType="all">
<mibObj oid=".1.3.6.1.4.1.9.9.221.1.1.1.1.18"
instance="cempMemPoolEntry" alias="cempMemPoolHCU" type="Gauge32" />
<mibObj oid=".1.3.6.1.4.1.9.9.221.1.1.1.1.20"
instance="cempMemPoolEntry" alias="cempMemPoolHCF" type="Gauge32" />
<property instance="cempMemPoolEntry" alias="entPhysicalName">
<parameter key="source-type" value="entPhysicalEntry" />
<parameter key="source-alias" value="entPhysicalName" />
<parameter key="index-pattern" value="^(.+)\.\d+$" />
</property>
<property instance="cempMemPoolEntry" alias="poolNumber"
class-name="org.opennms.netmgt.collectd.IndexSplitPropertyExtender">
<parameter key="index-pattern" value="^.+\.(\d+)$" />
</property>
</group>
However, when it comes to distributed CPU, *entPhysicalName* uses
*cpmCPUTotalPhysicalIndex* as its index, so statistics and names tables do
not share the same index. There is a proposed enhancement in NMS-8484 that
could deal with this through a class called
"org.opennms.netmgt.collectd.ColumnPropertyExtender", but it seems it was
never merged.
I was trying to apply the same strategy as above, but grabbing the
entPhysicalName from the *value* of cpmCPUTotalPhysicalIndex, like this:
<group name="cpmCPUTotalTable" ifType="all">
<mibObj oid=".1.3.6.1.4.1.9.9.109.1.1.1.1.8"
instance="cpmCPUTotalEntry" alias="cpmCPUTotal5" type="Gauge32" />
<mibObj oid=".1.3.6.1.4.1.9.9.109.1.1.1.1.2"
instance="cpmCPUTotalEntry" alias="cpmCPUTotalPhysicalIndex" type="string"
/>
<property instance="cpmCPUTotalEntry" alias="entPhysicalName"*
class-name="org.opennms.netmgt.collectd.ColumnPropertyExtender"*>
* <parameter key="column-index" value="cpmCPUTotalPhysicalIndex" />*
<parameter key="source-type" value="entPhysicalEntry" />
<parameter key="source-alias" value="entPhysicalName" />
</property>
</group>
Any ideas?
Thanks,
Gianpietro
I would really appreciate any pointer to solving this kind of issue.