Regex Property Extender

The Regex property extender works similarly to the Index Split property extender, with the added capability of importing a string property from a source table.

When to Use the Regex Property Extender

The Regex property extender is useful when some portion of the target MIB table’s index can be used as an index to the source MIB table. For example, the Cisco Airespace bsnAPIfLoadParametersTable is indexed using the tuple of bsnAPDot3MacAdddress and bsnAPIfSlotId, whereas the bsnAPTable is indexed on bsnAPDot3MacAddress alone.

bsnAPIfLoadParametersEntry OBJECT-TYPE
    -- ...
        "An entry (conceptual row) in the Table.
        Entries in this MIB are indexed by
        bsnAPDot3MacAddress and bsnAPIfSlotId"
    INDEX           {
                    } (1)

    -- ...

    -- ...
        "An entry in the bsnAPTable."
    INDEX           { bsnAPDot3MacAddress } (2)
    -- ...
1 bsnAPDot3MacAddress is the first component of the compound index for the entry type for bsnAPIfLoadParametersTable.
2 bsnAPDot3MacAddress is the sole index for the entry type for bsnAPTable.

By extracting just the first index component and using the result as an index into the source MIB table, it’s possible to import the human-sensible bsnAPName string property from the source MIB table.

Configure the Regex Property Extender

The Regex property extender expects three parameters, all of which are required:

Table 1. Regex Property Extender Parameters
Name Description


The name of the resourceType associated with the source MIB table.


The alias name of the string property to import from the source MIB table.


A regular expression containing one matching group.

The index-pattern expression must meet the same criteria as for the Index Split property extender. The subpattern matched by its first capturing group will be used as an index into the source MIB table; any further groups are ignored.

This example shows how to use the value of bsnAPDot3MacAddress as an index into the bsnAPTable.

<resourceType name="bsnAPEntry" label="Cisco Wireless AP" resourceLabel="${bsnAPName} (index ${index})">
  <persistenceSelectorStrategy class="" />
  <storageStrategy class="" />

<resourceType name="bsnAPIfLoadParametersEntry" label="Cisco Wireless AP Resources" resourceLabel="${bsnAPName} (index ${index})">
  <persistenceSelectorStrategy class="" />
  <storageStrategy class="" />

  <group name="bsnAPTable" ifType="all">
    <mibObj oid="." instance="bsnAPEntry" alias="bsnAPName" type="string" /> (1)

  <group name="bsnAPIfLoadParametersTable" ifType="all">
    <mibObj oid="." instance="bsnAPIfLoadParametersEntry" alias="bsnAPIfLoadNumOfCli" type="integer" />
    <property instance="bsnAPIfLoadParametersEntry" alias="bsnAPName" class-name="org.opennms.netmgt.collectd.RegExPropertyExtender"> (2)
      <parameter key="source-type" value="bsnAPEntry" />
      <parameter key="source-alias" value="bsnAPName" />
      <parameter key="index-pattern" value="^(.+)\.\d+$" /> (3)
1 Regular string property bsnAPName on the source table
2 Extended string property bsnAPName on the target table
3 Regular expression; the portion in parentheses is what gets extracted. \d+ means "one or more decimal digit characters".